Date: Thu, 26 Jul 2007 22:26:02 +0200 From: Peter Boosten <peter@boosten.org> To: "P.U.Kruppa" <ulrich@pukruppa.net> Cc: freebsd-questions@freebsd.org Subject: Re: awk question Message-ID: <46A9035A.8030308@boosten.org> In-Reply-To: <20070726214006.X54947@small> References: <20070726214006.X54947@small>
next in thread | previous in thread | raw e-mail | index | archive | help
P.U.Kruppa wrote: > 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? > Hmmm, works for me it does... Peter -- http://www.boosten.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?46A9035A.8030308>