forked from colonelpanic/dotfiles
[Shell] Make localip a function
This commit is contained in:
parent
7b6353954a
commit
67f2f1a884
@ -448,3 +448,8 @@ function in_git_directory {
|
||||
function which_readlink {
|
||||
readlink -f "$(which $1)"
|
||||
}
|
||||
|
||||
function localip {
|
||||
command_exists ip && ip addr show
|
||||
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'"
|
||||
}
|
||||
|
@ -24,7 +24,6 @@ alias ls="command ls ${colorflag}"
|
||||
|
||||
# IP addresses
|
||||
alias externalip="dig +short myip.opendns.com @resolver1.opendns.com"
|
||||
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'"
|
||||
|
||||
alias whois="whois -h whois-servers.net"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user