commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
Combines wgzhao's grep | awk | sed into one awk command.
There are 4 alternatives - vote for the best!
I've been using it in a script to build from scratch proxy servers.
Simple and easy. No regex, no search and replace. Just clean, built-in tools.
only output the ip addres. I put double pipe with sed because not parse with operator OR (|) in redex.
If you can do better, submit your command here.
You must be signed in to comment.