[ale] THANKS to all who replied to "ls -rt | rm -i" problem, BUT...

Geoffrey esoteric at 3times25.net
Fri Mar 17 11:50:07 EST 2006


Courtney Thomas wrote:
> Personally finding awk awkward...no wait,...impenetrable, if $NF is the 
> last field, and the 6th field is desired to sort on, $NF - 
> <wanted_field#> since $NF is last, can you say "$NF + 5" OR "$NF - 
> <wanted_field#>"... to get to the wanted date field ?

Actually NF is the last field number in awk.  Therefore $NF will be the 
last field in the string.  You are close, you would actually need to do 
something like $(NF - 5) to do math on this value.

-- 
Until later, Geoffrey



More information about the Ale mailing list