fix ips issue #998

pull/1000/head
MaYuming 2017-07-08 11:12:07 +08:00
parent a61edb6a25
commit 7006261b42
1 changed files with 1 additions and 1 deletions

View File

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