如果我grep -ir "somethingtomatch" .从当前目录运行,我通常会得到如下结果:
./some/path/file1.html: filecontent filecontent keyword filecontent
./some/path/file2.html: filecontent filecontent filecontent keyword
./some/path/file3.html: filecontent keyword filecontent filecontent
./some/path/file4.html: keyword filecontent filecontent filecontent
Run Code Online (Sandbox Code Playgroud)
我使用过,grep --color=auto -ir 'somethingtomatch" .但它只在红色突出显示上以白色突出显示关键字。我也在尝试获取左侧颜色编码的文件名。我怎么做?
我在 OS X 中使用 Terminal.app 和 bash 和 xterm(我也尝试过 xterm-color)。
| 归档时间: |
|
| 查看次数: |
5856 次 |
| 最近记录: |