因此,我试图运行unixclang --help | grep -f
命令来获取clang帮助中包含文本“ -f”的行列表。显然,这并不起作用,因为grep认为-f是他的选择,而不是认为这是搜索的模式。
问题是:如何搜索以破折号开头的模式?
只需使用 \\-f
$ ls --help | grep \\-f
-f do not sort, enable -aU, disable -ls --color
--file-type likewise, except do not append '*'
--format=WORD across -x, commas -m, horizontal -x, long -l,
--full-time like -l --time-style=full-iso
--group-directories-first
file-type (--file-type), classify (-F)
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句