bug#56077: Pattern Beginning With Dash Throws Error

2022-06-18 Thread Paul Eggert
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

bug#56077: Pattern Beginning With Dash Throws Error

2022-06-18 Thread gazip--- via Bug reports for GNU grep
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 [