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."

11 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. 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 Sir+Groane · · Score: 5, Informative

      Because Steve Bourne was doing this work back in 1975! About that time people had only just got beyond programming by biting holes in paper-tape with their teeth!

      These days it is quite easy to get embedded perl or lisp etc.

  4. Sh? by janeuner · · Score: 5, Funny

    $ Sh
    sh: Sh: command not found

  5. Re:PowerShell by CannonballHead · · Score: 5, Insightful

    Because most Windows users need a shell. Right.

    UNIX wasn't exactly one of those home-user targeted operating systems. It makes sense to have a rather powerful shell on it, scripting abilities, compilers, etc.

    Windows 95, 98, XP, etc., all the non-server ones, didn't need a shell. I grew up using Windows and never once needed something like that. Arguably, it would be nice on the server side, I guess... but Windows did appear to try to get AWAY from the command line.

    Besides. If they included a shell, everyone would just complain how they're copying UNIX and thus are even more useless. :)

  6. Re:Do windows users need a shell? by TheLink · · Score: 5, Interesting

    You can use perl and python for windows.

    For example, for perl there's Bundle::Win32

    http://search.cpan.org/~jdb/Bundle-libwin32-0.30/libwin32.pm

    Useful stuff like: Win32::TieRegistry , Win32::ChangeNotify

    But be good and don't write malware. The antivirus people might give up trying to detect perl malware (think about it - polymorphic TMTDOWTDI perl malware...), they might just flag/blacklist perl itself :).

    --
  7. 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!