2016-09-23 10:37:44 -06:00
|
|
|
# Displays information about the network configuration
|
2016-12-29 22:30:46 -07:00
|
|
|
netinfo() {
|
2016-09-23 10:37:44 -06:00
|
|
|
printf '--------------- Network Information ---------------\n'
|
|
|
|
/sbin/ifconfig | awk /'inet addr/ {print $2}'
|
|
|
|
/sbin/ifconfig | awk /'Bcast/ {print $3}'
|
|
|
|
/sbin/ifconfig | awk /'inet addr/ {print $4}'
|
|
|
|
/sbin/ifconfig | awk /'HWaddr/ {print $4,$5}'
|
|
|
|
myIP =$(wget -qO- http://ipecho.net/plain)
|
|
|
|
printf 'Public: %s\n' "$myIP"
|
|
|
|
printf '---------------------------------------------------'
|
|
|
|
}
|