Me: I need to determine if an executable is in my path. So I use which...
Old Sk00l Unix Guru #1: Right.
Old Sk00l Unix Guru #2: Right.
Me: But I need to do it from a script, so I'm checking the exit code....
OSUG #1: Right.
OSUG #2: Right.
Me: And that works great on Linux. But on Solaris, it's 0 on both success and failure.
OSUG #1: Can't you just put it in backticks and grep the output?
Me: Well sure, I can. But it seems like such an old utility should have a way to return 'yes' or 'no'. What's the Old Sk00l UNIX Way to do this?
*all three characters pore over Solaris man page, which was last updated in 1992*
Me: I guess I'll do that. I just wanted to be sure that if I did the backtick and grep thing, someone isn't going to look at that later and say "what a n00b".
OSUG #1: You can write a comment that says "let me know if you have a better way".
OSUG #2: Or "to overcome braindead Solaris return code values".
Me: I guess leaving a comment about someone being braindead IS the Old Sk00l UNIX Way.
Wednesday, September 23, 2009
Monday, September 7, 2009
The Children Are Our Future
Number Two son (age 8) comes in to report that Number One son (age 10) is calling him stupid!
Labels:
children,
NERD,
programming
Subscribe to:
Posts (Atom)