elenapan/Scripts/inet_noipaddr.sh
elena 9a2fdf5c79 updated some scripts and uploaded some new ones
Former-commit-id: 6c9faff508
Former-commit-id: 17d19dad6bdde82ff8c2bcc983f87a49bb4a5e6f
Former-commit-id: 4f66d0d17a4bb9ceb3eedf158bae309fa71fb8b1
2017-12-07 09:45:55 +02:00

17 lines
397 B
Bash
Executable file

# needs work! not thoroughly tested...
# Replace with your own interface names here
WIRELESS_IF="wlp3s0"
WIRED_IF="enp2s0f0"
WIFI="$(ifconfig | grep -A 1 $WIRELESS_IF | grep "inet" | awk '{print $2}')"
ETHER="$(ifconfig | grep -A 1 $WIRED_IF | grep "inet" | awk '{print $2}')"
if [ ${#ETHER} -eq "0" ]; then
if [ ${#WIFI} -eq "0" ]; then
echo ""
else
echo ""
fi
else
echo ""
fi