浏览代码
Avoid grep ambiguities
Where regular expression is read from a variable and -e argument is not
provided, the resulting call may end up being interpreted as grep
argument, This can be pretty dangerous, eg. if the variable expands to
`--help`, grep help is shown and grep exits with zero, which would be
interprered as match. Another example is when the variable expands to
a valid grep parameter; this would mean that next argument would be
interprered by grep as the regex, and if the argument after that would
be missing, grep would read stdin, resulting in data messup or grep waiting
indefinitely.