[CentOS] script help - '3rd last field'

Mon Jun 8 09:52:15 UTC 2009
Mogens Kjaer <mk at crc.dk>

muhammad panji wrote:
...
> awk -F\. {'print $3'}
> awk -F\. {'print $5'}
> awk -F\. {'print $6'}

awk -F\. {'print $(NF-2)'}

Mogens
-- 
Mogens Kjaer, Carlsberg A/S, Computer Department
Gamle Carlsberg Vej 10, DK-2500 Valby, Denmark
Phone: +45 33 27 53 25, Mobile: +45 22 12 53 25
Email: mk at crc.dk Homepage: http://www.crc.dk