On 6/18/22 15:05, gazip--- via Bug reports for GNU grep wrote:
I just encountered a problem where when the search pattern starts with a dash,
grep interprets it as an argument parameter.
That's normal for grep. See question 3 of:
https://www.gnu.org/software/grep/manual/html_node/Usage.html
Hello,
I just encountered a problem where when the search pattern starts with a dash,
grep interprets it as an argument parameter. It does not matter in what kind of
quotes the pattern is wrapped. See examples below.
$ echo "- break -" | grep "- break -"
grep: invalid option -- ' '
Usage: grep [