atom-beautify/examples/nested-jsbeautifyrc/bash/expected/netinfo.sh

12 lines
462 B
Bash
Raw Normal View History

# Displays information about the network configuration
2016-12-29 22:30:46 -07:00
netinfo() {
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 '---------------------------------------------------'
}