aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/wmsl-ip
blob: 3594050e20f1caf4b83fd4e5596e573ac1026c79 (plain) (blame)
1
2
3
4
#!/bin/sh
# Display IP address of primary network interface

ip route get 1.1.1.1 2>/dev/null | awk '{print $7; exit}' | grep -E '^[0-9]' || printf "No IP"