Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Jul 2007 21:47:49 +0200 (CEST)
From:      "P.U.Kruppa" <ulrich@pukruppa.net>
To:        freebsd-questions@freebsd.org
Subject:   awk question
Message-ID:  <20070726214006.X54947@small>

Next in thread | Raw E-Mail | Index | Archive | Help
Hi (and sorry for this slightly OT question),

I would like to extract the second last field of each line of a 
file called user.csv .
So I try
 	> awk '{print $(NF-1)}' user.csv
 	awk: trying to access out of range field -1
  	input record number 1, file user.csv
  	source line number 1

Obviously $(NF-1) doesn't do the trick. Any better idea?

Thanks,

Uli.



Peter Ulrich Kruppa
Wuppertal
Germany




Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?20070726214006.X54947>