bug#60038: grep 2.20 - invalid option with search pattern "-/"

2022-12-13 Thread Jim Meyering
tags 60038 notabug thanks On Tue, Dec 13, 2022 at 10:04 AM Daniel Schättgen wrote: > When searching for a pattern that includes "-/", the pattern is interpreted > as option: > > [dsg@db01]# grep "-" example.txt > --/-- > [dsg@db01]# grep "/" example.txt > --/-- > [dsg@db01]# grep "-/" example.tx

bug#60038: grep 2.20 - invalid option with search pattern "-/"

2022-12-13 Thread Daniel Schättgen
Hello, When searching for a pattern that includes "-/", the pattern is interpreted as option: [dsg@db01]# grep "-" example.txt --/-- [dsg@db01]# grep "/" example.txt --/-- [dsg@db01]# grep "-/" example.txt grep: invalid option -- '/' Usage: grep [OPTION]... PATTERN [FILE]... Try 'grep --help' fo