[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: Re: Grep corrupt in BusyBox 1.15.2
From: Göran_Hillebrink <goran.hillebrink () transmode ! com>
Date: 2009-12-04 8:17:18
Message-ID: OFDF5E589D.A2BE2210-ONC1257682.002D77C7-C1257682.002D8796 () transmode ! se
[Download RAW message or body]
Yes it works now in 1.15.2.
Thanks.,
Goran
\
From: Denys Vlasenko <vda.linux@googlemail.com> \
\
To: busybox@busybox.net \
\
Date: 2009-12-04 02:47 \
\
Subject: Re: Grep corrupt in BusyBox 1.15.2 \
\
Sent by: busybox-bounces@busybox.net \
\
On Thursday 03 December 2009 19:35, Cristian Ionescu-Idbohrn wrote:
> On Thu, 3 Dec 2009, Göran Hillebrink wrote:
>
> > If I run the command:
> >
> > echo "/var/test" | grep -o '[^/]*$'
> >
> > I should get the result test but grep ends up in a forever loop.
>
> Right.
> I see the same thing with BusyBox v1.16.0.git.
Try attached patch.
> Funny though. I was not aware grep did 'sed' job too (edit the result).
> I see GNU grep 2.5.1, 2.5.3 and 2.5.4 do the same thing. Man page says:
>
> ,----
> > DESCRIPTION
> > grep searches the named input FILEs (or standard input if no
> > files are named, or the file name - is given) for lines containing
> > a match to the given PATTERN. By default, grep prints the
> > ^^^^^^^^^^^^^^^^^^^^^^^^^^^
> > matching lines.
> > ^^^^^^^^^^^^^^
> `----
>
> and:
>
> ,----
> > -o, --only-matching
> > Show only the part of a matching line that matches PATTERN.
> `----
>
> seems to contradict that. Weird... Bug?
If you use "-o", "by default" wording no longer apply.
--
vda
[attachment "7.patch" deleted by Göran Hillebrink/Transmode] \
_______________________________________________ busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic