最近我正在使用OSX山狮。当我使用Terminal.app时,我发现我的grep无法再次运行。
无论我做什么,grep总是报警:
$ grep --version
*usage: grep [-abcDEFGHhIiJLlmnOoPqRSsUVvwxZ] [-A num] [-B num] [-C[num]]
[-e pattern] [-f file] [--binary-files=value] [--color=when]
[--context[=num]] [--directories=action] [--label] [--line-buffered]
[--null] [pattern] [file ...]*
My grep is locate at /usr/bin/:
$ ls -lh /usr/bin/grep
*-rwxr-xr-x 3 root wheel 29K Jul 26 22:52 /usr/bin/grep*
我不确定这个grep太小了,它只有29K。
答案 0 :(得分:2)
你有GREP_OPTIONS
设置(无效)吗?键入env
会转储您的环境变量,您可以查看这些变量以查找它(我通常使用grep
,但是......)