aboutsummaryrefslogtreecommitdiffstats
path: root/.aliases
diff options
context:
space:
mode:
authorRich Healey <richo@psych0tik.net>2012-05-23 11:15:37 +0200
committerMathias Bynens <mathias@qiwi.be>2012-05-23 11:16:37 +0200
commit475039d0d665be2b386f3697f7456f72537f50d3 (patch)
treeb4635a63adc11cc972d4ffad6d3e657972adce9b /.aliases
parentcde65958822479391ca558e4d9031eec43133e51 (diff)
downloaddotfiles-475039d0d665be2b386f3697f7456f72537f50d3.tar.gz
dotfiles-475039d0d665be2b386f3697f7456f72537f50d3.tar.bz2
dotfiles-475039d0d665be2b386f3697f7456f72537f50d3.zip
.aliases: Make `ips` show IPv6 addresses as well
Diffstat (limited to '.aliases')
-rw-r--r--.aliases2
1 files changed, 1 insertions, 1 deletions
diff --git a/.aliases b/.aliases
index b171b44..bb571a8 100644
--- a/.aliases
+++ b/.aliases
@@ -40,7 +40,7 @@ alias update='sudo softwareupdate -i -a; brew update; brew upgrade'
# IP addresses
alias ip="dig +short myip.opendns.com @resolver1.opendns.com"
alias localip="ipconfig getifaddr en1"
-alias ips="ifconfig -a | perl -nle'/(\d+\.\d+\.\d+\.\d+)/ && print $1'"
+alias ips="ifconfig -a | grep -o 'inet6\? \(\([0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+\)\|[a-fA-F0-9:]\+\)' | sed -e 's/inet6* //'"
# Enhanced WHOIS lookups
alias whois="whois -h whois-servers.net"