[ale] Question about awk
Geoffrey
lists at serioustechnology.com
Thu Sep 17 09:26:29 EDT 2009
Ed Cashin wrote:
> 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.
I love awk. Once wrote a language parser with it. Now that was ugly.. ;)
--
Until later, Geoffrey
Those who would give up essential Liberty, to purchase a little
temporary Safety, deserve neither Liberty nor Safety.
- Benjamin Franklin
More information about the Ale
mailing list