Re: Grep Help

  • From: "Egor Starostin" <egorst@xxxxxxxxx>
  • To: post.ethan@xxxxxxxxx
  • Date: Thu, 13 Apr 2006 17:54:38 +0400

> > cat f
>
> $Log: Blah
>
> > grep "\$Log: .*\$" f
>
> $Log: Blah
>
> I am actually looking for a line which has Dollar Log Colon ...any
> characters...dollar...any characters...but this still returns the line, even
> thought it is missing the last dollar. I am sure this is a pretty obvious
> one, please help.
Citation from Solaris' man:
***
Be careful using the characters $, *, [, ^, |, (, ),  and  \
in  the pattern_list because they are also meaningful to the
shell. It is safest to enclose the  entire  pattern_list  in
single quotes  '... '.
***
So, just use '\$Log: .*\$' to get the right result.


--
Egor
http://www.oracledba.ru
--
//www.freelists.org/webpage/oracle-l


Other related posts: