[PD] get my ip

Marc Lavallée odradek at videotron.ca
Sat Jan 31 01:22:06 CET 2004


On Fri, Jan 30, 2004 at 11:54:16AM +0100, Orm Finnendahl wrote:

> Copy the attached script "ip_num.sh" somewhere, ...

My version of the script (for Mandrake), 
with the interface name as an argument.
-----------------------------------------------
#!/bin/sh
ifconfig $1 | grep 'inet adr:' \
| sed -e 's/ \+inet adr:\([0-9|.]\+\).*$/\1/g'
-----------------------------------------------

For example:
ip_num.sh eth0

--
Marc




More information about the Pd-list mailing list