develooper Front page | perl.beginners | Postings from February 2002

Re: Get IP address from ifconfig

Thread Previous
From:
Richard Balfour
Date:
February 1, 2002 09:14
Subject:
Re: Get IP address from ifconfig
Message ID:
Pine.LNX.4.33.0202011210560.1092-100000@beethoven.balmedia.com
Hi Chris,

Thanks for the tip.  My script works like a charm now!

Cheers,
Richard


On Fri, 1 Feb 2002, Chris Weyn wrote:

> Richard,
>
> the bash shell script I used to do that was the following:
>
> /sbin/ifconfig eth0 |grep inet |cut -d ' ' -f12 | cut -d ':' -f2
>
> This may not be generic, and you may have to fine-tune it to work for you, but
> it should give you the basic premise...
>
> Chris Weyn, Austin TX
>


Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About