Hi,
Don't know if you actually need the -a option with ifconfig (-a also shows dummy0, which has no ip).
If not:
ifconfig | awk '/^[a-z]/ { printf("%s", $1) } /inet add/ { print $2 }' | sed 's/addr:/ /'
Hope this helps.
PS: If -a must be used and device is called dummy0:
ifconfig -a | awk '/^[a-z]/ { printf("%s", $1) } /inet add/ { print $2 }' | sed -e 's/dummy0/dummy0\n/' -e 's/addr:/ /'
Last edited by druuna; 12-11-2005 at 07:17 AM.
|