Re: grep: BRE with caret
On Mon, 21 Aug 2006 14:18:26 -0400, Chris Mattern wrote:
> Daniel Mentz wrote:
>> The following command should find all lines containing "xx^x":
>> grep "xx^x"
>>
>> But it doesn't match lines containing "xx^x".
>> I'm using grep (GNU grep) 2.5.1
> Using GNU grep 2.5.1:
>
> syscjm@ayato:~$ grep "xx^x" << EOF
> > xxx^
> > ^xxxx
> > xxaxx^xb
> > xx^xstuff
> > now is the time
> > for all xx^x
> > EOF
> xxaxx^xb
> xx^xstuff
> for all xx^x
> syscjm@ayato:~$
>
>
> Certainly seems to work fine to me. Perhaps you could be
> more specific about your problems.
I tried the command you provided on three different machines and I get a
different output (no output at all). Would you mind trying it on another
machine as well?
I also downloaded a vanilla version of GNU grep 2.5.1 and I'm getting the
same result.
[mentz@baobab src]$ ./grep "xx^x" << EOF
> xx^x
> EOF
[mentz@baobab src]$
Thanks
Daniel Mentz
|