Slashdot Mirror


Steve Bourne Talks About the History of Sh

An anonymous reader writes "Steve Bourne, the creator of the Bourne shell, or sh, talks about its history as the default Unix shell of Unix Version 7. Bourne worked on the shell in 1975 and said the process took no more than 6 months. Sh aimed to improve on the Thompson shell. 'I did change the shell so that command scripts could be used as filters. In the original shell this was not really feasible because the standard input for the executing script was the script itself. This change caused quite a disruption to the way people were used to working. I added variables, control flow and command substitution. The case statement allowed strings to be easily matched so that commands could decode their arguments and make decisions based on that. The for loop allowed iteration over a set of strings that were either explicit or by default the arguments that the command was given. I also added an additional quoting mechanism so that you could do variable substitutions within quotes. It was a significant redesign with some of the original flavor of the Thompson shell still there. Also I eliminated goto in favour of flow control primitives like if and for. This was also considered rather radical departure from the existing practice. Command substitution was something else I added because that gives you very general mechanism to do string processing; it allows you to get strings back from commands and use them as the text of the script as if you had typed it directly. I think this was a new idea that I, at least, had not seen in scripting languages, except perhaps LISP,' he says."

17 of 232 comments (clear)

  1. Sh! by iminplaya · · Score: 5, Funny

    That was a pre-emptive "sh!" Now, I have a whole bag of "sh!" with your name on it.

    --
    What?
    1. Re:Sh! by yo_tuco · · Score: 5, Funny

      "I have a whole bag of "sh!" with your name on it."

      In other words, you have the whole shebang?

  2. Real history. by girlintraining · · Score: 5, Funny

    The history of "Sh" started when the first kid was born, and it has continued to this day. Later forked versions include "Shh!" and "STFU".

    --
    #fuckbeta #iamslashdot #dicemustdie
    1. Re:Real history. by Tribbin · · Score: 5, Funny

      *BASH*

      --
      If you mod this up, your slashdot background will turn into a beautiful sunset!
    2. Re:Real history. by girlintraining · · Score: 5, Funny

      tcsh, tcsh, tcsh. -Mom

      --
      #fuckbeta #iamslashdot #dicemustdie
    3. Re:Real history. by Naatach · · Score: 4, Funny

      *BASH*

      Bourne Again SHell - I remember when I first learned of it, thinking "Wow! Unix meets Jesus!".

      --
      There may be no "I" in team, but there's also no "F" in way.
    4. Re:Real history. by Anonymous Coward · · Score: 1, Funny

      Really? It made me think MATT DAMON

    5. Re:Real history. by Anonymous Coward · · Score: 1, Funny

      The history of "Sh"...

      In a nutshell:

      It's no hassle...
      Sh!
      But...
      Sh!
      I'm...
      Sh!
      All I'm say...
      Sh!
      There gonna get a...
      Sh!
      I'm...
      Sh!
      I'm just...
      Sh!
      Would...
      Sh!... Knock-knock.
      Who's there?
      Sh!
      But...
      Let me tell you a little story about a man named Sh!

    6. Re:Real history. by sortius_nod · · Score: 4, Funny

      Shell To Frustrate Users?

  3. Greenspun's Tenth Rule by Sir+Groane · · Score: 5, Funny

    it allows you to get strings back from commands and use them as the text of the script as if you had typed it directly. I think this was a new idea that I, at least, had not seen in scripting languages, except perhaps LISP,

    Greenspun's Tenth Rule: "Any sufficiently complicated C or Fortran program contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of Common Lisp"

    1. Re:Greenspun's Tenth Rule by overlordofmu · · Score: 2, Funny

      I use CMU Lisp as my shell.

      cat /etc/passwd | grep overlordofmu

      overlordofmu:x:1000:1000::/home/overlordofmu/:/bin/lsip

      Example ---

      mu login:
      Password:
      CMU Common Lisp 19e (19E), running on mu
      With core: /lib64/cmucl/lib/lisp.core
      Dumped on: Thu, 2008-05-01 11:56:07-05:00 on usrtc3142
      See for support information.
      Loaded subsystems:
      Python 1.1, target Intel x86
      CLOS based on Gerd's PCL 2004/04/14 03:32:47

      *

      Aren't I amusing!?!?

    2. Re:Greenspun's Tenth Rule by Hatta · · Score: 4, Funny

      Greenspun's Tenth Rule: "Any sufficiently complicated C or Fortran program contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of Common Lisp"

      As a corollary, we can see that any C or Fortran program that does not contain an ad hoc, informally-specified, bug-ridden slow implementation of half of Common Lisp is insufficiently complicated.

      --
      Give me Classic Slashdot or give me death!
  4. Sh? by janeuner · · Score: 5, Funny

    $ Sh
    sh: Sh: command not found

  5. Now there's a man with hair on his chest by TennesseeVic · · Score: 5, Funny

    He was writing an _Algol68_ compiler as part of his Ph.D. work in _astronomy_?! I'm not worthy! I'm not worthy!

  6. Re:PowerShell by m.ducharme · · Score: 3, Funny

    I thought he was referring to Apple's price for a Mac Mini with OS X installed.

    --
    Rule of Slashdot #0: You and people like you are not representative of the larger population. - A.C.
  7. Re:PowerShell by unitron · · Score: 3, Funny

    Imagine the noise of a beowulf cluster of washing machines

    They're called laundromats.

    --

    I see even classic Slashdot is now pretty much unusable on dial up anymore.

  8. Re:PowerShell by cptnapalm · · Score: 4, Funny

    I've heard of those... they process threads there, don't they?