Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Grep Help

Re: Grep Help

From: Egor Starostin <egorst_at_gmail.com>
Date: Thu, 13 Apr 2006 17:54:38 +0400
Message-ID: <f0fc91970604130654q4c85973bn9c263b05ac0f24f9@mail.gmail.com>


> > 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
--
http://www.freelists.org/webpage/oracle-l
Received on Thu Apr 13 2006 - 08:54:38 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US