[ale] THANKS to all who replied to "ls -rt | rm -i" problem, BUT...
Geoffrey
esoteric at 3times25.net
Fri Mar 17 11:55:46 EST 2006
Geoffrey wrote:
> 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.
Let me correct that. NF is the total number of fields for the current
record. Since you reference the fields with numbers ($1 is the first
field, $2, is the 2nd..) $NF will get you the last field value.
It's friday okay?
--
Until later, Geoffrey
More information about the Ale
mailing list