I want to print the second-to-last column or field in awk
. The number of fields is the NF
variable. I know that I should be able to use $NF
, but I'm not sure how it can be used.
And this does not seem to work:
awk ' { print ( $NF-- ) } '
awk
I want to print the second-to-last column or field in awk
. The number of fields is the NF
variable. I know that I should be able to use $NF
, but I'm not sure how it can be used.
And this does not seem to work:
awk ' { print ( $NF-- ) } '
Best Answer
Should work