Wednesday, July 25, 2012

cmdfu

The internet continues to delight and amaze.

cmdfu

Put this in .bashrc (or aliases.zsh if you swing that way)

cmdfu(){ wget -qO - "http://www.commandlinefu.com/commands/matching/$@/$(echo -n "$@" | openssl base64)/plaintext"; }

And ...

$ cmdfu awk
# commandlinefu.com by David Winterbottom

# Get the IP address
ip -f inet a | awk '/inet / { print $2 }'

# Get the IP address
ip a s eth0 | grep "inet " | head -n 1 | awk '{print $2}' | cut -f1 -d'/'
(snip)

Whoa.

From.
blog comments powered by Disqus