View Single Post
qole's Avatar
Moderator | Posts: 7,109 | Thanked: 8,820 times | Joined on Oct 2007 @ Vancouver, BC, Canada
#28
Originally Posted by lma View Post
... in which case you probably want the IP address of the default route interface:

Code:
ip addr list dev `ip route list exact 0/0 | cut -d" " -f5` | \
  sed -ne "s/^.*inet \([0-9.]*\).*$/\1/p"
There's no ip command... Where would I get it?
__________________
qole.org --- twitter --- Easy Debian wiki page
Please don't send me a private message, post to the appropriate thread.
Thank you all for your donations!