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:
I use this in a script on my openwrt router to check if my DynDNS needs to be updated, saves your account from being banned for blank updates.
There are 2 alternatives - vote for the best!
Strips the non-ip information from the dig output. Could be combined with "head -1" to ensure a single ip is returned. Useful for outputting as a variable for use in scripts.
If you can do better, submit your command here.
You must be signed in to comment.