Subject: Re: bug#18377: piping output through egrep -- escaping of "+" only needed sometimes. Why?

From: Paul Eggert <[email-masked]>
Date: Mon, 01 Sep 2014 01:05:51 -0700

[email-masked] 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.