11 lines
233 B
Plaintext
11 lines
233 B
Plaintext
|
#!/bin/sh
|
||
|
eth="$(ip -4 addr show enp8s0 | grep -oP '(?<=inet\s)\d+(\.\d+){3}')"
|
||
|
wlp="$(ip -4 addr show wlp7s0 | grep -oP '(?<=inet\s)\d+(\.\d+){3}')"
|
||
|
|
||
|
if [[ $(echo $eth | wc -c) -gt 1 ]]
|
||
|
then
|
||
|
echo "$eth"
|
||
|
exit;
|
||
|
fi
|
||
|
|
||
|
echo "$wlp"
|