awk question

n j nino80 at
Fri Jul 27 07:28:20 UTC 2007

> >     > awk '{print $(NF-1)}' user.csv
> Yup, those blank lines will kill it for sure. A sed filter to
> remove blank lines ahead of the awk statement should allow it to
> work properly.

Or awk only i.e. no sed:

awk '!(/^$/) { print $(NF-1) }' user.csv


More information about the freebsd-questions mailing list