如何在 CLI 中获取 Linux 所有打开的 Chromium 标签列表?

How to get all opened chromium tabs list for Linux in CLI?

我试试这个:

strings ~/'.config/chromium/Default/Current Session' | grep 'https?:'

但我只得到一场比赛。这是怎么回事 ? oO 输出为换行 \n 分隔

我只能 'grep' 使用 awk:

strings ~/'.config/chromium/Default/Current Session' | awk '/^https?:/'

Grep 默认使用标准正则表达式。使用 egrepgrep -E 允许您使用 awk 使用的相同 "extended regular expressions" 语法。

strings ~/'.config/chromium/Default/Current Session' | grep -E '^https?:'

您也可以使用标准正则表达式:

strings ~/'.config/chromium/Default/Current Session' | grep '^https\?:'