[ale] Question about awk
Ed Cashin
ecashin at noserose.net
Thu Sep 17 08:40:52 EDT 2009
On Thu, Sep 17, 2009 at 7:36 AM, Geoffrey <lists at serioustechnology.com> wrote:
...
> awk -F '[\\[\\]]' '/Recipient address rejected/ {print $10}'
Bravo! :)
For fields that are near the end, it's sometimes more readable or
convenient to use the "NF" variable for number of fields, like this:
bash$ echo one two three four | awk '{print $(NF-1)}'
three
Not sure if that's helpful here, but I like that awk feature.
--
Ed Cashin <ecashin at noserose.net>
http://noserose.net/e/
More information about the Ale
mailing list