My most-useful and least-used shell script
I have a large number of small shell scripts I've either written or collected over the years. Today I had the opportunity to use my favorite one—which is rare, as I only need it a couple times a year. But when I do need it, it's a wonderful little script.
It's also a very simple-minded script, as it does just one thing: it copies my public IP address to the clipboard and shows it in a pop-up message, as seen at right. OK, so that's two things, but they're very closely related.
Clearly this isn't something I need to do often, but when I do, the script changes this…
Switch to browser, open new tab, load the DynDNS check IP page, drag mouse to select IP address, press Command-C to copy, switch back to destination app, press Command-V to paste
…into this…
Press a key combo, wait about a second, then press Command-V
This is a big timesaver, obviously, and it makes the process about as easy as it could be.
I originally wrote this up for Mac OS X Hints a few years back, but thought I'd post it here (given the changes at Macworld, I'm not sure how long the hints site may be around). I've also modified it a bit, as I no longer use growlnotify for the onscreen display of the copied IP address.
You can read the original how-to at hints, or below, where I've posted the updated version that no longer uses growlnotify.