我想知道使用 - 多彩参数在grep中使用多种颜色突出显示的正确语法,但它说 - 多彩是未知选项。< / p>
请参阅下面的命令:
$ grep --colorful color color.txt
grep: unknown option -- colorful
Usage: grep [OPTION]... PATTERN [FILE]...
Try 'grep --help' for more information.
谢谢大家。
答案 0 :(得分:4)
该选项名为--color
或--colour
。不是--colorful
。
--colour[=WHEN], --color[=WHEN]
Surround the matching string with the marker find in GREP_COLOR
environment variable. WHEN may be 'never', 'always', or 'auto