sed syntax
jvetterli-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f at public.gmane.org
jvetterli-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f at public.gmane.org
Tue Feb 3 20:57:08 UTC 2009
On Tue, Feb 03, 2009 at 03:18:53PM -0500, Matt Price wrote:
> ...
> cool. what if there weren't always 10 fields? is there a
> straightforward awk way to just get the final numerical expression?
This
sed 's/^.*[^0-9]//'
will discard as much as possible from the start of the line, ending with
a non-digit. Of course, if there's anything after the number, even
whitespace, it won't work.
HTH
JV
--
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