Discussion: grep: BRE with caret
Afficher un message
Vieux 21/08/2006, 19h51   #6
Daniel Mentz
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut 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
  Réponse avec citation
 
Page generated in 0,05725 seconds with 9 queries