focus on first ip in list to ignore subnets from virtd

This commit is contained in:
simon 2021-02-04 15:54:07 +07:00
parent 6d337abc8e
commit d864b91341
1 changed files with 1 additions and 2 deletions

View File

@ -11,9 +11,8 @@ fi
# when connected
if [[ $(ip a | grep "state" | grep -Ev 'tun|lo' | grep "UP ") ]]; then
printmain=$(ip -br addr show | grep -v 'lo' \
| awk '{print $3}' | awk -F '/' {'print $1}' | tr '\n' ' ')
printsmall=$(ip -br addr show | grep -v 'lo' \
| awk '{print $3}' | awk -F '/' {'print $1}' | head -n 1)
printsmall=""
printcolor="#00FF00"
fi