Here's what I do: extint="eth0" extip="`/sbin/ifconfig $extint | grep 'inet addr' | awk '{print $2}' | sed -e 's/.*://'`" extmask="`/sbin/ifconfig $extint | grep 'inet addr' | awk '{print $4}' | sed -e 's/.*://'`" extbcast="`/sbin/ifconfig $extint | grep 'inet addr' | awk '{print $3}' | sed -e 's/.*://'`" extnet="${extip}/${extmask}" -----Original Message----- From: andrew@andrewsmith.plus.com [mailto:andrew@andrewsmith.plus.com] Sent: Saturday, April 14, 2001 8:00 AM To: suse-linux-e@suse.com Subject: [SLE] Getting the IP of ppp0 Hi After changing ISPs I no longer get a static IP so I want to be able to somehow get the IP of ppp0 and use it in my custom firewall script. So far I have the following: MYIPADDRESS=`ifconfig | grep P-t-P | awk '{ print $3 }'` although this puts 'addr:xxx.xxx.xxx.xxx' in the variable MYIPADDRESS. How can the front 'addr:' be chopped off, or is there an easier way to get just the IP of the current session? Many thanks Andrew -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/support/faq and the archives at http://lists.suse.com