8 lines
161 B
Bash
8 lines
161 B
Bash
|
echo Public IP
|
||
|
dig +short myip.opendns.com @resolver1.opendns.com
|
||
|
echo
|
||
|
echo Local IP
|
||
|
/sbin/ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}'
|
||
|
|
||
|
|