Log in

No account? Create an account
Oct. 28th, 2013 @ 11:26 am Quick One-Liner
About this Entry
Spiketail Hatchling
I know I don't post nearly as often as I should. Gotta work on that. Anyways, I've potentially got some excellent projects coming up including Nanowrimo later this week (in November). Really wanted to share this with everybody (especially myself in the future):

ping -o hostname | sed -n 's/.*bytes from \([^:]*\).*/\1/p'

That's right, kids: quick command-line means to extract only the IP address from a ping response given a hostname. Put that in your scripts and execute them.

'Til later.