[Shell] Fix localip command

This commit is contained in:
Ivan Malison 2016-10-09 23:02:57 -07:00
parent 9cc972bab1
commit 10b38aec5b
No known key found for this signature in database
GPG Key ID: 62530EFBE99DC2F8

View File

@ -450,6 +450,5 @@ function which_readlink {
} }
function localip { function localip {
command_exists ip && ip addr show command_exists ip && ip addr show || ifconfig | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1'
alias localip="ifconfig | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1'"
} }