updated regular expression

This commit is contained in:
arno 2020-07-22 18:35:12 +02:00 committed by GitHub
parent 47e43a0276
commit c6e56dbadf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,7 +17,7 @@ sudo mkdir /mnt/hdd/temp 2>/dev/null
sudo chmod 777 -R /mnt/hdd/temp 2>/dev/null
# localIP
localip=$(ip addr | grep 'state UP' -A2 | egrep -v 'docker0' | egrep -i '(eth|ens|enp|eno|wlan|wlp)' | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
localip=$(ip addr | grep 'state UP' -A2 | egrep -v 'docker0' | egrep -i '(*[eth|ens|enp|eno|wlan|wlp][0-9]$)' | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
echo "localIP='${localip}'"
# temp - no measurement in a VM