Alan Hargreaves' Blog

The ramblings of a former Australian SaND TSC* Principal Field Technologist

Why did I do a sh provider first?

Since I posted my initial blog on this, I’ve received a few comments and a surprising amount of mail asking why I did /bin/sh, which is an obviously obsolete shell, and not ksh93; some of it bordering on insulting.

Let me go through a few reasons why I did this one first.

  1. It’s the one I was asked to do.

  2. The Bourne shell has been around for a very long time and there are, quite literally, millions of scripts that have been written in it, some of them very poorly so.

  3. Much work in the open source environment is done to scratch an itch. In my day to day work doing performance calls I come across an amazing number of instances where being able to probe /bin/sh the way that this allows me to, would be an incredibly useful thing to have in order to explain to a customer why their thrown together script runs so slowly, most of these are /bin/sh scripts. Coding probes for ksh93 has no immediate impact on my day to day work as ksh93 is not yet integrated into OpenSolaris.

  4. Just doing a quick poll of usr/src in the opensolaris tree gives me the following:

    Scripting Language Actual scripts Dynamically created scripts Comments
    /bin/sh 463 538
    /usr/bin/sh 39 43 /bin symlinked to /usr/bin
    /sbin/sh 186 272 symlink to /bin/sh
    /bin/ksh 212 199
    /usr/bin/ksh 53 50 /bin symlinked to /usr/bin
    /bin/perl 13 9
    /usr/bin/perl 241 237 /bin symlinked to /usr/bin
    ksh93 0 0
  5. sh is a logical first step from which other providers can follow.

  6. ksh93 is currently on a track to get integrated. I really don’t want to drop any roadblocks on it now.

  7. Does it really matter which one comes first?

At no point did I say I would not consider doing ksh93 or even helping someone else do it, indeed I have had communication with Roland suggesting ways in which this could be done. Believe it or not, there is a plan to get all the shells done. Keep an eye on

The last thing I expected when I started on this was to be the target of insults because I didn’t do someone’s favorite shell. I’m wondering how this kind of behavior encourages anyone to actually do anything that is of any benefit to the community. Come on folks, we can do better than that.

Technorati Tags:


Written by Alan

August 13, 2007 at 6:07 pm

Posted in OpenSolaris

9 Responses

Subscribe to comments with RSS.

  1. Hear, hear. Well done, Alan.

    Boyd Adamson

    August 13, 2007 at 7:16 pm

  2. +1.
    PS – When are you doing the Plan 9 shell? 😉

    Joshua Clulow

    August 13, 2007 at 10:39 pm

  3. Joshua: ROFLMAO
    You know the funny thing is, that while I was at Newcastle, rc *was* my shell of choice.

    Alan Hargreaves

    August 13, 2007 at 11:14 pm

  4. My vote goes for ksh88 for instant gratification – with probably half the shell bits in ON being in ksh, it would make an excellent companion to the sh provider.


    August 14, 2007 at 12:15 am

  5. Insults? Bloody hell! I was *stunned* when I saw your initial blog post about this just now – getting any sort of coverage of shells with DTrace will be an absolute God-send, thanks hugely for the work on this!
    [ late congrats here, since I’m on vacation, and shouldn’t even be using a computer right now! ]
    Much of the ZFS test suite is written in shell (believe it or not) and having more observability into some of the more complex scripts that we have will be wonderful.
    ( I’m still looking for a shell syntax checker that’s clever enough to know that "$ZFSPOOl" isn’t a variable that’s been declared, whereas "$ZFSPOOL" is – damn shell scripts 😉

    Tim Foster

    August 14, 2007 at 1:35 am

  6. Tim, you are aware of set -u (or sh -u), right?

    Boyd Adamson

    August 14, 2007 at 4:09 am

  7. I was one of those surprised that you started with /bin/sh, but after your explanations it seems like a perfectly reasonable choice, and I did not by any way mean to insult.


    August 14, 2007 at 5:13 am

  8. This is the problem with Open Source (Linux) bigots. Its one thing to be passionate about FOSS but a whole another thing to throw stones at any other effort. This in my view is wrong.
    Keep the good work going, you must be doing something right for you are attracting a lot of criticism 🙂 No better litmus test.


    August 14, 2007 at 9:00 am

  9. Its amazing how developers putting in good work on a project get criticized (mainly by non-contributers) for not doing something on another project. It’s your itch you do as you please, if they have a more pressing itch maybe they should do something about it (and I don’t mean complain about people who are doing actual work).
    People who can’t or won’t contribute to projects should leave there comments to praise or constructive suggestions.
    Keep up the great work,

    Peter Bray

    August 14, 2007 at 5:19 pm

Comments are closed.

%d bloggers like this: