[ale] Is awk the right tool for this?

Geoffrey esoteric at 3times25.net
Tue May 7 08:39:30 EDT 2002


Danny Cox wrote:

> 	grep dropped /var/log/kernel/info | sed '/.*\(SRC=[^ ][^ ]*\).*/\1/' |
> sort | uniq | ... might do it.  I'm assuming that "SRC=?" ends with a
> space, thus my use of the '[^ ][^ ]*'.  You may could also match the
> "dotted quad", something like 'SRC=[0-9.][0-9.]*', which will match any
> run of numbers and decimal points.

If SRC=???? does not contain any white space, what about:

grep dropped | while read data; do
	eval export $data
	echo $SRC
done

Anything that's not of the type something=something else will be 
ignored, yet SRC= will now be treated as a shell var.

-- 
Until later: Geoffrey		esoteric at 3times25.net

I didn't have to buy my radio from a specific company to listen
to FM, why doesn't that apply to the Internet (anymore...)?


---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
sent to listmaster at ale dot org.






More information about the Ale mailing list