Wednesday, September 23, 2009

A Professional Technical Conversation

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.


  1. 1) I can't believe you actually answered this with something other than a "lol".

    2) Once again I bow to the Wisdom of POSIX. I bet my non-old sk00l, but standards-loving, coworker would have known this. I should ask him.

    3) I'm also amazed that StackOverflow actually had something relevant, correct and (apparently) googleable.

  2. blah blah blah i love to talk blah blah blah and it takes me 15 minutes to write this BLAH!!!!