Script

Steve Phillips steve at focb.co.nz
Mon Jan 3 21:17:42 UTC 2005


On Mon, 3 Jan 2005, truc nguyen wrote:

> Hi,
>
> In my hosts file, the last line is as follow
> 197.2.23.134      truc TRUC
>
> I want to write a script to get the this IP address.
> What command in sed or awk to execute this ?

tail -1 /etc/hosts | cut -f1

-- 
Steve.




More information about the redhat-list mailing list