emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: GNU bug Tracking System
Subject: bug#60038: closed (grep 2.20 - invalid option with search pattern "-/")
Date: Wed, 14 Dec 2022 05:46:01 +0000

Your message dated Tue, 13 Dec 2022 21:45:21 -0800
with message-id 
<CA+8g5KE4UvLO+3qrQ4eBdKqG6H_+ppQm-81T-7DQvRn9rMMJ-g@mail.gmail.com>
and subject line Re: bug#60038: grep 2.20 - invalid option with search pattern 
"-/"
has caused the debbugs.gnu.org bug report #60038,
regarding grep 2.20 - invalid option with search pattern "-/"
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
60038: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=60038
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: grep 2.20 - invalid option with search pattern "-/" Date: Tue, 13 Dec 2022 09:50:44 +0000

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' for more information.
[dsg@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@abraxas.de

HRB: 9540, Saarbrücken
GF:  Daniel Schaum & Andreas Heid
https://www.abraxas.de

__________________________

Profidata Group

Investment Management Solutions

 


--- End Message ---
--- Begin Message --- Subject: Re: bug#60038: grep 2.20 - invalid option with search pattern "-/" Date: Tue, 13 Dec 2022 21:45:21 -0800
tags 60038 notabug
thanks

On Tue, Dec 13, 2022 at 10:04 AM Daniel Schättgen
<daniel.schaettgen@abraxas.de> 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.txt
> grep: invalid option -- '/'
> Usage: grep [OPTION]... PATTERN [FILE]...
> Try 'grep --help' for more information.
> [dsg@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.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]