Update 'myip.sh'
This commit is contained in:
2
myip.sh
2
myip.sh
@@ -4,7 +4,7 @@ function get_ip {
|
||||
ip a show $1 | grep -m 1 inet | awk '{print $2}' | cut -d / -f 1
|
||||
}
|
||||
|
||||
INTERFACES=$(ip a show | grep -E "^[0-9]:" | cut -d ' ' -f 2 | cut -d : -f 1)
|
||||
INTERFACES=$( ip a show | grep -E "^[0-9]{0,3}:" | cut -d ' ' -f 2 | cut -d : -f 1 )
|
||||
|
||||
for ni in $INTERFACES
|
||||
do
|
||||
|
||||
Reference in New Issue
Block a user