Merge pull request #1000 from YumingMa/master

fix ips issue #998
pull/1004/head
Nils Winkler 2017-07-08 16:54:48 +02:00 committed by GitHub
commit 4244685388
1 changed files with 1 additions and 1 deletions

View File

@ -7,7 +7,7 @@ function ips ()
group 'base' group 'base'
if command -v ifconfig &>/dev/null if command -v ifconfig &>/dev/null
then then
ifconfig | awk '/inet /{ print $2 }' ifconfig | awk '/inet /{ gsub(/addr:/, ""); print $2 }'
elif command -v ip &>/dev/null elif command -v ip &>/dev/null
then then
ip addr | grep -oP 'inet \K[\d.]+' ip addr | grep -oP 'inet \K[\d.]+'