LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   infrmation about ip only via ifconfig ? (https://www.linuxquestions.org/questions/linux-networking-3/infrmation-about-ip-only-via-ifconfig-25790/)

saavik 07-15-2002 06:50 AM

infrmation about ip only via ifconfig ?
 
Hello!
is there something to get a output only about the ip?

if i type :

ifconfig ppp0

i get to much infos!
i just want to get the ip!

paulewogg 07-15-2002 09:37 AM

ifconfig ppp0 | grep inet

HTH

Paul

saavik 07-15-2002 09:55 AM

thanx to much
 
that was really a good idea!

i configured a little bit.
here is what is working now!


ip=`ifconfig -a ppp0 | grep "inet addr" | cut -f2 -d ":" | cut -f1 -d "P"`
echo ftp://USERNAME:PASSWORT@$ip > ip.txt
mail mail@whoever.com < ip.txt


so you just don`t need a fix ip anymore!

paulewogg 07-15-2002 10:15 AM

Glad it worked out for you!


All times are GMT -5. The time now is 06:56 PM.