[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ale] Question about awk



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/