At 12:40 AM 2/8/00 +0000, Richard Adams wrote:
>> I'm try to sort out a (simple) way of determining the local hosts IP address
>> (not the 127 address...
>
>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.

Actually, he said to use "hostname -i". I tried this and, to my surprise
(since I "knew" the same thing you did), it worked as promised, displaying
the IP address of my NIC. According to the man page (yes, it IS mentioned in
the man page) it will display all the IP addresses of a multi-address host.
You learn something new every day ....


------------------------------------"Never tell me the odds!"---
Ray Olszewski                                        -- Han Solo
Palo Alto, CA                                    [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

Reply via email to