bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: Bug in grep ??


From: Stepan Kasal
Subject: Re: Bug in grep ??
Date: Tue, 17 Jun 2003 14:30:10 +0200
User-agent: Mutt/1.2.5.1i

Hello,
        thank you for your mail.

On Tue, Jun 17, 2003 at 10:52:56AM +0300, Gil Meirovich wrote:
> I am trying to grep lines that contain the $ sign. I could only grep two
> consecutive '$'s, by executing:
> grep \$\$ <list of files>
> 
> Is that a bug, or I just could not find the "trick" ?

you are probably not escaping the dollar signs properly.

Assuming that you work on a Unix style environment (eg. linux or cygwin),
this should work:

grep '\$' <list of files>


Detailed explanation:
> grep \$\$ <list of files>

the shell probably eats the backslashes, and grep sees only $$, which
probably means ``dollar at the end of line.''

With '\$', the shell strips only the single quotes, and grep sees \$,
which is what we need.

HTH,
        Stepan Kasal




reply via email to

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