On Mon, 07 Feb 2000, John Horne wrote:
> Hello,
> 
> I'm try to sort out a (simple) way of determining the local hosts IP address
> (not the 127 address, but the address used by the ethernet card in my case)
> on linux and solaris systems. I know that ifconfig shows this, and it can be
> grepped but is there a simple command that says what the IP address is (like
> hostname gives the hosts name)? I can't think of one and couldn't find one.
> If not, then its going to have to be ifconfig|grep.

ifconfig eth0 | awk -F addr: '{ print $2 }' | cut -f1 -dB

I dont know if that will still work for ppp just try it, substute
eth0 with ppp0.

BTW, someone else said use 'hostname', well most of us know that
'hostname' shows your hostNAME and NOT the IP address.

> 
> Thanks,
> 
> John.
> 
> --------------------------------------------------------------------------
> John Horne, University of Plymouth, UK             Tel: +44 (0)1752 233914
> E-mail: [EMAIL PROTECTED]
> Finger for PGP key: [EMAIL PROTECTED]
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
> the body of a message to [EMAIL PROTECTED]
> Please read the FAQ at http://www.linux-learn.org/faqs
-- 
Regards Richard
[EMAIL PROTECTED]
http://people.zeelandnet.nl/pa3gcu/

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.linux-learn.org/faqs

Reply via email to