Use shorter ifconfig command

main
Jay Moore/NQ4T 2 years ago
parent 4f48587ad2
commit d0ab6174f3

@ -11,5 +11,5 @@
dev=em0 dev=em0
ifconfig $dev | grep inet | awk -F '[ \t]+|/' '{print $3}' | grep -v ^fe80 ifconfig $dev | awk '/inet/ && !/inet6/ {print $2}'
#ip -4 addr show dev $dev | awk '/inet/ {print $2}' # for machines using `ip` #ip -4 addr show dev $dev | awk '/inet/ {print $2}' # for machines using `ip`

Loading…
Cancel
Save