GNU bug report logs - #18377
piping output through egrep -- escaping of "+" only needed sometimes. Why?

Previous Next

Package: grep;

Reported by: terrygalant.lists <at> fastest.cc

Date: Mon, 1 Sep 2014 02:17:01 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


Message #10 received at 18377-done <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: terrygalant.lists <at> fastest.cc, 18377-done <at> debbugs.gnu.org
Subject: Re: bug#18377: piping output through egrep -- escaping of "+" only
 needed sometimes. Why?
Date: Mon, 01 Sep 2014 01:05:51 -0700
terrygalant.lists <at> fastest.cc wrote:
> Why do I need to escape the "+" in the last case, but not in the first?

Because "+" is a special character to egrep.  The pattern "libstdc++" is 
equivalent to the pattern "libstdcc*" which matches in the first case, 
whereas the pattern "libstdc++.so" is equivalent to the pattern 
"libstdcc*.so" which does not match in the last case.




This bug report was last modified 10 years and 349 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.