Oh my god
Posted by: nico on
Jul 29th, 2010 |
Filed under: Console
Unix trivia day: in the olden days of the 90’s there were a lot of Unix boxes out there named “elvis”. Nowdays it’s not uncommon to find one, either. Have you ever wondered why are there so many boxes called elvis?
This is related to Solaris’ ping command. When you ping $HOST it prints “$HOST is alive” (if it’s responding the pings), thus elvis is alive!
Posted by: nico on
Sep 24th, 2009 |
Filed under: Console, Programming
Anyway, this is the part of the script I came up with to get the enum elements:
cat enum_definition.h | sed -n ‘/enum OID/,/\}\;/ s/\(.*\)/\1/p’
Nice voodoo, isn’t it? How the hell are you supposed to understand that? Well, you’re not, sed is write-only-code, but you can try reading http://www.grymoire.com/Unix/Sed.html#toc-uh-25, a great sed introduction.
Have fun!
Posted by: nico on
Sep 15th, 2009 |
Filed under: Console
One last note: at will “remember” the current environment variables, so PWD, USER, OLD_DIR and all that will be the same. This means if you schedule a command with a relative path it’ll still work!
Posted by: nico on
Jul 23rd, 2009 |
Filed under: Console, Programming
| Of course, it requires mocp, my favorite music (on console) player. And obviously, you’ll have to configure SEARCH_DIR but I’m sure some bash hacking is not that hard. Beware though, using this + cron may have the undesired effect of awakening to the pleasant music of Cannibal Corpse. |
![]() |