sed syntax

Ian Petersen ispeters-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
Tue Feb 3 20:53:30 UTC 2009


On Tue, Feb 3, 2009 at 12:47 PM, Lennart Sorensen
<lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org> wrote:
> On Tue, Feb 03, 2009 at 03:18:53PM -0500, Matt Price wrote:
>> > Lennart Sorensen wrote:
>> > > How about:
>> > >
>> > > sed 's/.*block \([0-9]*\)$/\1/'
>> > >
>> hmm, that also seems to just return the same data unprocessed.
>
> echo "[125559.165041] Buffer I/O error on device sda5, logical block 19698429" | sed 's/.*block \([0-9]*\)$/\1/'
>
> returns: 19698429
>
> What else should it do?

Maybe Matt is looking for this:

sed -n 's/.*block \([0-9]*\)$/\1/p'

?

Ian
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list