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

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

Re: bug in grep 2.5.1


From: Dasarath Weeratunge
Subject: Re: bug in grep 2.5.1
Date: 23 Oct 2003 18:06:36 +0600

also, what about this? (note the last colon : in RE)

address@hidden:~$ tail -2 /etc/passwd | grep -o '^[^:]*:'
dasaru:
x:
1000:
100:
:
/home/dasaru:
telnetd:
x:
102:
102:
:
/usr/lib/telnetd:
address@hidden:~$ tail -2 /etc/passwd | grep -o '^[^:]*'
dasaru
telnetd
address@hidden:~$


On Thu, 2003-10-23 at 17:48, Anuradha Ratnaweera wrote:
> It is related to the bug you pointed to me earlier.  When -o is users,
> it prints the match, but doesn't advance to the next line but stays
> there.
> 
> Is this a bug or a feature?
> 
>       Anuradha
> 
> On Thu, 2003-10-23 at 17:52, Dasarath Weeratunge wrote:
> > address@hidden:~$ tail -3 /etc/passwd | grep -o '^[^:]*:'
> > sshd:
> > x:
> > 101:
> > 65534:
> > :
> > /var/run/sshd:
> > dasaru:
> > x:
> > 1000:
> > 100:
> > :
> > /home/dasaru:
> > telnetd:
> > x:
> > 102:
> > 102:
> > :
> > /usr/lib/telnetd:
> > address@hidden:~$ tail -3 /etc/passwd | grep -o ':[^:]*$'
> > :/bin/false
> > :/bin/bash
> > :/bin/false
> > address@hidden:~$
> > 
> 





reply via email to

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