Talk:Bourne shell

message: Hi, I can see the same errors on that page as on the one about "Unix shell".
The Bourne shell is generally no longer located as /bin/sh. It is only the case on some very rare systems (like Solaris cited above). Many systems don't have a Bourne shell at all anymore, and when they have one, it's generally either in a non standard place such as /usr/old/bin or has a different name such as bsh or sh.bourne. The sh code wasn't made free until very recently. That's why no Free Unix system ever had it (exception of early BSDs which was the cause of law suites, BSDs then adopted the Almquist shell which was a free reimplementation of the Bourne shell as it could be found on SysV with some extensions and has now been made POSIX (modern sh) conformant).
Many scripts are still written in a Bourne compatible syntax, but just because it is the greatest common denominator of the shs of the past and current Unices. sh is often confused with the Bourne shell because sh has been the Bourne shell on many systems for a long period of time.
So it's no longer a popular default shell either, nor is it the default login shell for root on many operating systems. sh is though.
And it's wrong to say it's standard on all commercial Unices.
See my comments on the Unix shell page for details.
Another error:
"for loops, in particular the use of $* to loop over arguments". That's incorrect. $* is the concatenation of the positional parameters. It's $@ when double quoted that allows to loop over the positional parameters, not $*. And "for" loops over the positional parameters by default, so there's no need to specify "$@":
 for i do
   whatever "$i"
 done
(it's not for do od, but for do done in the Bourne shell)
I don't know if one can say that the Korn shell was written "much later" than csh. I believe it was started in the early eighties (read 1982 somewhere) so only 3 years after csh (I might be wrong on that one).
:re: Bourne shell usage.
:Dates and version numbers may be hard to find. I suspect there was a also divergence as various vendors quickly patched and enhanced the original shell, without sharing these source changes(?) (sh was an "open system", but not "open source").  I know of one DB vendor actually included their standard shell in their DB distribution so as to avoid any unexpected enhancements from the OS vendors.  c.f. Talk:Unix shell#Shells listed by compatibility.  Would a Timeline of Bourne shell enhancements & clones be an overkill?
:Re: while ~ do ~ od
:Your comment is clearly correct.  As /bin/od would have predated the Bourne shell syntax, and while ~ do ~ done is correct.  I can fix this right away.  Are there any historical citations on why done as used?  The Bourne's original mac.h file uses both, eg.
 FOR ~ DO ~ OD       # for loop #
 WHILE cond DO ~ OD  # early termination loop #
 REP ~ PER cond DONE # late termination loop #
 LOOP ~ POOL         # infinite loop #
:Re: $* vs "$@"
:Makes me wonder if Bourne built in $@ originally, or it was added as an enhancement.  I see a lot of $* in code even today that should be "$@".  Was "$@" apart of the original design, or an enhancement?  Need to check the original source tree somehow...  I wonder if is still compiles... :-)  (BTW IIRC csh used $*:q for "$@") --NevilleDNZ 12:48, 10 September 2006 (UTC)
replies: text: $@ has been introduced in 1986 with SVr3 (see main article). --Schily (talk) 10:28, 28 June 2012 (UTC)
replies: text: I wouldn't say it was over-kill, but it sounds like it would be difficult to research and cite, since most of those changes are by definition closed and binary. -- Gwern  (contribs) 22:47, 10 September 2006 (UTC)
replies: text:  The "do" "od" dialect probably came from Algol 68, for what it's worth.  Algol 68 also used while elihw, if fi, and case esac. --Tony Sidaway 13:38, 18 January 2008 (UTC)
thread_title:  Previously untitled section 

message: I removed the paragraph under Descendants which talks about the C shell, because it's not a descendant of the Bourne shell (it ran The C shell (csh), derived not from the Bourne shell but the Thompson shell,&hellip). I incorporated the relevant (and only the relevant) context into the Korn shell's description; also improving the style somewhat. I hope it works for you. --Rfsmit (talk) 21:14, 21 July 2008 (UTC)
thread_title:  Descendants 

message: Should this page be retitled: Bourne shell; a history or Bourne shell; background??
and a link added to a page that actually talks about what the Bourne shell is/does?
DGerman (talk) 14:29, 29 January 2009 (UTC)
replies: text: What do you think should be in this article that isn't?  Bear in mind that this is an encyclopedic article about the Bourne shell and not a Bourne shell tutorial or technical reference as per WP:NOTHOWTO.  This article is certainly not perfect but it puts the shell in historical context and describes new features and language constructs with this shell.  I don't think a comprehensive listing of all language cosntructs is particularly merited here: that is better off in a Bourne shell reference guide or tutorial. CrispMuncher (talk) 19:41, 29 January 2009 (UTC)
thread_title:  Not really about the Bourne shell? 

message: Bourne called them "shell procedures" not "shell scripts".  Should this article follow his terminology?  Geo Swan (talk) 04:29, 1 February 2009 (UTC)
thread_title:  question... 

message: This article about sh starts with a screenshot of another shell, bash. Although the article claims that bash is a clone of sh (I do not agree), would it not be more enlightening to have instead a screenshot of the same program as is discussed in the article? For instance, the standard prompt in sh is "$", while in bash it is "user-name@host-name:/the/current/dir$". Also, colorisation by default is very uncommon for sh in my experience. To me, this is much like having a picture of a SAAB car in an Opel article, although you could claim that modern SAABs are simply Opel-clones (since many parts are compatible). 83.209.89.69 (talk) 20:08, 27 June 2010 (UTC)
replies: text: agree - the example is off-topic.  Not everything needs a picture, anyway.  Tedickey (talk) 20:19, 27 June 2010 (UTC)

text: Okay, I'm the culprit who did this, so perhaps I should explain both why I did it and why I've now undone it.  This screenshot appeared on the Unix shells page.  I thought it was pretty unattractive and not very helpful because it didn't show how shell windows appear on a typical desktop.  I replaced it there with a screenshot of sh and tcsh windows running under Mac OS X.  So what to do with the ugly screenshot?  I first thought about moving it lower on that page but then thought, better still, why not just move it to the sh page.  Okay, I hear you.  Bad idea.  My apologies.  That said, I do think a good screenshot would be helpful and if someone has something better, I hope they'll post it.  Msnicki (talk) 20:41, 27 June 2010 (UTC)
replies: text: I have to agree with tedickey - I don't think a picture is called for.  Shells are fundamentally textual rather than graphical and any screen shot is going to be of a termianl emulator rather than the shell itself. Crispmuncher (talk) 14:29, 28 June 2010 (UTC)
replies: text: Okay, but imagine someone asking what sh is or does if you have a machine handy that runs sh.  Wouldn't you do something to demonstrate it?  Maybe you'd ls the desktop directory to show you get at the same stuff through the shell.  Maybe you'd demo something iterating over a set of wildcard matches.  You would do something very simple, very clear to show what it looks like and what it does.  Can we grab that image?  What I never liked about the bash screenshot was that it was just so random!  It was a random snapshot of a random bash session, looking over the shoulder of someone who liked really ugly colors doing who-knows-what.  A good picture can teach something, it can make things tangible.  I think if you have one that's well thought-out, it helps.  But I'm way more a csh person than an sh person (which is part of why I backed off so quick,) so again, I apologize for the misstep.  Do what you think is right.  Regards. Msnicki (talk) 16:40, 28 June 2010 (UTC)
thread_title:  Screenshot of another shell? 

message: The list of features currently includes "Scripts can be invoked as commands by using their filename". Was this a feature of the Bourne shell, or of the Unix kernel? In modern Unices it's certainly a kernel feature. Qwertyus (talk) 22:04, 2 February 2011 (UTC)
replies: text: Both is wrong.... Scripts that start with #!/path/to/interpreter are handled by most kernels, other scripts are handled by the shell. --Schily (talk) 23:35, 2 February 2011 (UTC)
thread_title:  Scripts invoked by filenames 

message: The article mentions that "It was released in 1977 in the Version 7 Unix release", however the Version_7_Unix article states that Version 7 Unix was released in 1979. Not both are right, or there is a trick. DelTree (talk) 12:50, 30 January 2012 (UTC)
replies: text: 1977 may be wrong, the oldest date that can be found in a sh source is 1978. --Schily (talk) 10:22, 7 May 2012 (UTC)

text: Stephen Bourne claims that the Bourne Shell development started in 1976 and resulted in a first usable version at that time Schily (talk) 14:42, 7 June 2016 (UTC)
replies: text: Schily, usable version means nothing when it comes to release time.  Uziel302 (talk) 11:00, 4 December 2019 (UTC)
thread_title: Date

message: The introduction says that the Bourne shell "was a replacement for the Thompson shell", and the Origins sections says that "The shell was designed as a replacement for the Mashey shell."  So which is it? Teemu Leisti (talk) 08:18, 4 January 2013 (UTC)
thread_title:  Successor of which shell? 

message: Should good places to learn the Bourne shell be a separate article?
A class given at UC Berkeley by Michael Paoli has a concise reference to learning the shell. http://www.rawbw.com/~mp/unix/sh/ From experience teaching scripting he recommends starting with the six page 1979 sh man page! http://plan9.bell-labs.com/7thEdMan/v7vol1.pdf
Another good answer for where beginners might productively start seems to be the "Advanced Bash-Scripting Guide" http://tldp.org/LDP/abs/html/ which despite the title doesn't start at the Advanced level.  Advanced is where you will end up after reading it.  — Preceding unsigned comment added by Grantbow (talk • contribs) 09:45, 31 March 2013 (UTC)
thread_title:  Learning Bourne shell 

message: After having a quick read through the page I seem to have found a small discrepancy seen below:
We should probably research this and seen which once is actually correct. Else, if it was created to replace both the Thompson and Mashey shell that should be made more clear. Else, if is was designed to replace the Mashey shell, but in reality it actually replaced the Thompson shell, then that also should be more clearly stated.  -bsimmons 216.249.42.52 (talk) 13:33, 29 September 2014 (UTC)
thread_title:  Contradictory Information? 

message: The article Bourne shell states that the Bourne shell was released in 1977, but the article Thompson shell states that the Bourne shell was released in 1979. Can anyone provide a reliable source settling the matter? The editor who uses the pseudonym "JamesBWatson" (talk) 16:29, 27 November 2015 (UTC)
replies: text: Stephen Bourne claims he started with the shell in late 1975 and deployed the first version in early 1976. Then a period of time, the result was tested, discussed and modified. His feature list from 1977 looks pretty complete. Schily (talk) 17:04, 27 November 2015 (UTC)
replies: text:  I suppose there could be room for different interpretations of what "released" means, since if it was gradually developed over the course of several years, it could have gradually spread to a wider audience, rather than there being one date when it was suddenly made public. However, a source giving clearer information as to when it became generally available would be welcome. The editor who uses the pseudonym "JamesBWatson" (talk) 09:05, 28 November 2015 (UTC)
replies: text: Then the "release time" for UNIX could be much later than what people believe today as e.g. Stephen Bourne claims that 1975 was the first year when UNIX was used outside USG. Schily (talk) 17:36, 23 February 2016 (UTC)
thread_title:  Date?