GNU bug report logs -
#60038
grep 2.20 - invalid option with search pattern "-/"
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your bug report
#60038: grep 2.20 - invalid option with search pattern "-/"
which was filed against the grep package, has been closed.
The explanation is attached below, along with your original report.
If you require more details, please reply to 60038 <at> debbugs.gnu.org.
--
60038: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=60038
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
tags 60038 notabug
thanks
On Tue, Dec 13, 2022 at 10:04 AM Daniel Schättgen
<daniel.schaettgen <at> abraxas.de> wrote:
> When searching for a pattern that includes "-/", the pattern is interpreted as option:
>
> [dsg <at> db01]# grep "-" example.txt
> --/--
> [dsg <at> db01]# grep "/" example.txt
> --/--
> [dsg <at> db01]# grep "-/" example.txt
> grep: invalid option -- '/'
> Usage: grep [OPTION]... PATTERN [FILE]...
> Try 'grep --help' for more information.
> [dsg <at> db01]# grep --version
> grep (GNU grep) 2.20
Thanks, but this is not a bug.
To search for a pattern that starts with "-", use grep's -e option, e.g.,
grep -e -/ example.txt
Also, you're using grep-2.20, which is more than 8 years old.
The latest is grep-3.8.
[Message part 3 (message/rfc822, inline)]
[Message part 4 (text/plain, inline)]
Hello,
When searching for a pattern that includes "-/", the pattern is interpreted as option:
[dsg <at> db01]# grep "-" example.txt
--/--
[dsg <at> db01]# grep "/" example.txt
--/--
[dsg <at> db01]# grep "-/" example.txt
grep: invalid option -- '/'
Usage: grep [OPTION]... PATTERN [FILE]...
Try 'grep --help' for more information.
[dsg <at> db01]# grep --version
grep (GNU grep) 2.20
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Mike Haertel and others, see <http://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>.
Kind regards
Daniel
abraxas Softwareentwicklungsgesellschaft mbH
Postfach 110101
D-66070 Saarbrücken
Altenkesselerstr. 17, Geb.C1
66115 Saarbrücken
Tel +49(0)681 976185-59
Daniel.Schaettgen <at> abraxas.de<mailto:Daniel.Schaettgen <at> abraxas.de>
HRB: 9540, Saarbrücken
GF: Daniel Schaum & Andreas Heid
https://www.abraxas.de<https://www.abraxas.de/>
__________________________
Profidata Group<https://www.profidatagroup.com/>
Investment Management Solutions<https://www.profidatagroup.com/>
[Message part 5 (text/html, inline)]
This bug report was last modified 2 years and 161 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.