cleanup
[cmdllinux.git] / scripts / _first_nic.sh
bloba912bb1e58bdc6194db93e5a7dc1a16bc347f89b
1 NIC=`ip addr | grep "^[0-9]\+:" | grep -v "^[0-9]\+: lo:" | grep " state UP " | head -n 1 | cut -d ' ' -f 2 | tr -d :`
2 if [ ! -z "$NIC" ]; then
3 ip addr show $NIC
4 fi