Talk:Bourne shell

From Wikipedia, the free encyclopedia
Jump to: navigation, search
WikiProject Linux  
WikiProject icon This article is within the scope of WikiProject Linux, a collaborative effort to improve the coverage of Linux on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
 ???  This article has not yet received a rating on the project's quality scale.
 ???  This article has not yet received a rating on the project's importance scale.
 
WikiProject Software / Computing   
WikiProject icon This article is within the scope of WikiProject Software, a collaborative effort to improve the coverage of software on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
 ???  This article has not yet received a rating on the project's quality scale.
 ???  This article has not yet received a rating on the project's importance scale.
Taskforce icon
This article is supported by WikiProject Computing.
 
WikiProject Free Software / Software / Computing   
WikiProject icon This article is within the scope of WikiProject Free Software, a collaborative effort to improve the coverage of free software on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
 ???  This article has not yet received a rating on the project's quality scale.
 ???  This article has not yet received a rating on the project's importance scale.
Taskforce icon
This article is supported by WikiProject Software.
Taskforce icon
This article is supported by WikiProject Computing.
 

Previously untitled section[edit]

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)
$@ has been introduced in 1986 with SVr3 (see main article). --Schily (talk) 10:28, 28 June 2012 (UTC)
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)
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)

Descendants[edit]

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)

Not really about the Bourne shell?[edit]

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)

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)

question...[edit]

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

Screenshot of another shell?[edit]

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)

agree - the example is off-topic. Not everything needs a picture, anyway. Tedickey (talk) 20:19, 27 June 2010 (UTC)
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)
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)
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)

Scripts invoked by filenames[edit]

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)

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)

License[edit]

Solaris distributes a version of the Bourne shell using CDDL. However, the license as cited in this topic probably should reflect that of whoever is the owner of the legacy AT&T code. That's probably not Oracle/Sun. TEDickey (talk) 10:49, 28 March 2011 (UTC)

well freeBsd has version the bourne shell under bsd lisence --82.44.40.210 (talk) 14:37, 28 May 2011 (UTC)

There are several (re)implementations, with differences... TEDickey (talk) 14:41, 28 May 2011 (UTC)
I doubt Solaris distributes a version of the Bourne shell. I removed the license until a reference is provided. --Chealer (talk) 05:59, 21 March 2012 (UTC)
Doubt is not a useful method for an encyclopedia. The right method is to write provable facts. The only way to prove in case of sh is to look into the sourcecode. SunOS-2.0 came with a Bourne Shell that did not yet support functions. SunOS-3.0 came with an updated Bourne Shell with function support and without the Pascal style code. SunOS-5.x comes with a renewed version that includes NLS / i18n support. Given the fact that the caldera historic UNIX license does not cover the Bourne Shell with function support, the only publically and legally available version is the version published by Sun under the CDDL. I urge you to currect your incorrect edit. --Schily (talk) 11:23, 21 March 2012 (UTC)
Hi Schily, I did not write anything in the article, I only removed the unsourced part claiming the Bourne shell was licensed under the CDDL. "Looking into the sourcecode" is not the way Wikipedia works, see Wikipedia:No original research. --Chealer (talk) 19:27, 21 March 2012 (UTC
No, you removed a proven statement. It seems that you missinterpret the way WP works. WP of course does not require to give on-line provable facts, a named book or a named closed source is sufficient. In case of the Bourne Shell, we fortunately have something to prove on-line: http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/cmd/sh/stak.c verifies that the CDDL applies and if you are unable to recognise that this is the Bourne Shell, you are just not the right person to judge. You claimed that the Bourne Shell is not available under the CDDL and this has been disproven. I urge you to fix your edit mistake. --Schily (talk) 22:01, 21 March 2012 (UTC)
No - you're stating something is not supported by WP:RS. The only likely source in OpenSolaris for "Bourne Shell" looks to be the CPL-licensed code. You should be more familiar with the code base than that. By the way, attacking other editors is uncivil. TEDickey (talk) 22:56, 21 March 2012 (UTC)
So you are obviously missing the needed skills to discuss this topic. Have a nice day. --Schily (talk) 23:13, 21 March 2012 (UTC)
"Looking into the sourcecode" would not be of help here, since no part of Schily's comments can be supported by looking there. Perhaps there is a WP:RS relating to the issue, but none has been offered for consideration in more than a year. TEDickey (talk) 20:32, 21 March 2012 (UTC)
There is more than one shell in Solaris. A quick check (on opensolaris.org) shows a "sh" marked CDDL. However, its relationship to Bourne Shell is unclear (dubious). There is a different "sh" with Bourne's name in the comment headers, which is marked CPL. In either case, OpenSolaris' source history doesn't go back nearly far enough to make statements of this sort more than guessing TEDickey (talk) 08:59, 21 March 2012 (UTC)
As noted, there are several implementations. The version on OpenSolaris derived from Bourne's source (see above) is from AT&T, using CPL. The licensing of other vendor's implementations (whether derived or not) varies. WP:RS is the place to start, rather than random unsourced personal opinions TEDickey (talk) 10:47, 22 March 2012 (UTC)
As noted already, your recent statements verify that you either write intentional nonsense or that you have a very poor level of programming knowledge. The fact that you claim to see the "Bourne Shell" in sources that have "ksh" in the files path names and that contain the tags "Korn Shell" and "David Korn" disqualifies you as a credible discussion partner. And BTW: I don't like your unfriendly tone. --Schily (talk) 12:31, 22 March 2012 (UTC)
There is no "ksh in "http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libshell/common/sh/main.c", and the comment header states clearly

/*

    22  * UNIX shell
    23  *
    24  * S. R. Bourne
    25  * Rewritten By David Korn
    26  * AT&T Labs
    27  *
    28  */
Likewise, the link that you added does not provide similar information, and as others will note, I've pointed out that there are different implementations, none of which has been cited using a reliable source to be the Bourne shell discussed in this topic. Your repeated personal attacks are the only notable thing about your comments TEDickey (talk) 22:37, 22 March 2012 (UTC)

I've given a reliable Source. Any person with some minimal basic knowlege in UNIX history or with minimal programmings skills will be able to understand that in contrary to you, I pointed to the Bourne Shell source. But even if both skills are missing, people who run a halfway POSIX compliant OS could compile the sources and check the behavior. And everybody who is able to compile, could run the Bourne Shell and compatible test script from http://www.in-ulm.de/~mascheck/various/whatshell/whatshell.sh to discover what shell he is using.

The Korn Shell is an halfway incompatible fork on the Bourne Shell source that started in 1982. I know of no serious person that would call the Korn Shell "a minor variant" of the Bourne Shell. Besides the Korn history editor, the main difference between Bourne Shell and Korn Shell is pipeline execution order. Korn Shell prints "test" with:

echo test | read var
echo $var

while Bourne Shell prints an empty line. Sources published by AT&T after aprox. 1984 do not include the "S. R. Bourne" tag in either Bourne or Korn Shell. Korn Shell sources that directly come from David Korn still have that tag but nobody would see this as an indication for seeing the Bourne Shell itself.

Regarding Licensing: Modern (function supporting) versions of the Bourne Shell have been closed source until Sun published a recent Bourne Shell under CDDL in June 2005. No other OSS license applies to such a Burne Shell variant. AT&T gave the OK for putting ksh93 under CPL in 2001. Before, the Korn Shell (but not the Bourne Shell) was availabe under a non-OSI compliant license for a few years (IIRC since 1997).

The advanced and portable version of the Bourne Shell that I publish since 2006 has been derived from the only legal OSS source at: http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/cmd/sh It adds the interactive shell history editor, I wrote in 1982-1984 for my private shell independently from David Korn.

The problem I see frequently with you is that you are missing the needed skills to be able to discuss a topic but still act as if you were the only person on the planet that knows things right. Together with your agressive discussion style, this creates a bad taste. I encourage you to behave more cooperative to avoid unneeded disputes. --Schily (talk) 15:06, 23 March 2012 (UTC)

As usual, you make several statements, providing no source aside from your assertions (the link is irrelevant, since what you say about it requires some WP:RS which is absent from the discussion as yet). TEDickey (talk) 00:36, 24 March 2012 (UTC)
You unfortunately still ignore proven facts and you still personally attack people. It is a proven fact, that a recent source version of the Bourne Shell (with functions (introduced with SVr2), job control (introduced with SVr4) and internationalization+wide char support (introduced with Svr4)) is available under the CDDL. If you believe that there other legal ways to get a recent Bourne Shell source, you are free to present us your information for verification. --Schily (talk) 14:13, 3 April 2012 (UTC)
The apparent motivation for Schily's edits is this activity TEDickey (talk) 20:34, 20 April 2012 (UTC)

Date[edit]

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)

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)

Criticism section[edit]

It does not sem to be serious to have a "Criticism" section that looks as it if has been written in early 1981 and assumes for correctness that we still are in 1981.

Today in 2012, the test utility is a built-in command since 31years.

Functions (that can act as aliases) are in the Bourhe Shell since 28 years.

Job Control is in the the Bourne Shell since 23 years.

A History and a command line history editor (which is more than csh had in 1981) is in since 5.5 years.

In other words, most of the features have been in the Bourne Shell before bash exists. Also the csh syntax not really a C-derived syntax either. Csh did offer a few features that help in interacetive use while the Bourne Shell has been written to be usable for interactive use and for scripts. --Schily (talk) 13:02, 12 May 2012 (UTC)

I had some concerns about the criticism section, so I added a POV-section tag to it. Specific issues include the phrasing "Even simple arithmetic" [emphasis mine] which suggests a judgment. Also, I believe the criticism about ALGOL-like structure refers to the source code that Mr. Bourne wrote the shell program in, not to anything that a user of the shell would see.
To frame the conversation positively rather than focusing on problems, I would say I have doubts about this section's encyclopedic value. It seems to me that that some editing to make it more focused on the facts would also address the POV concerns. Certainly some of this info is valuable in terms of comparing Bourne shell to more modern shells. Leoger (talk) 04:57, 17 February 2014 (UTC)

Successor of which shell?[edit]

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)

Learning Bourne shell[edit]

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 (talkcontribs) 09:45, 31 March 2013 (UTC)

Shell compatibility and Unix compatibility in general[edit]

First of all, I was under the mistaken (understandable?) impression that the Bourne shell was the original. I knew however that some systems substitute dash for sh (compatible) I think for programs. And I knew that user shells are selectable. Now my question is, is there a minimum amount of shell functionality that has been supported (and still is supported) in the "first considered" Unix shell? I know about the previous Thompson and PWB shells (are they the only previous shells?). Are they not considered Unix (anymore)? lintsh (should it be mentioned in the page?) inticates they are not important (or the Android shell?).

My (challenged) view is that "the shell" is not part of "Unix" for interaction by the user. That is the first component of compatibility, then there is also the "program behavior" of compatibility that I also think is essential to Unix compatibility. comp.arch (talk) 16:04, 22 July 2014 (UTC)

lintsh does not exist. The only approach you can do is to find a portable version of the oldest Shell you like to support and then test your script using this variant of the shell.
The oldest shell supported via autoconf-2.13 is the Bourne shell from 1982 that does not yet include functions. But this is more than 30 years ago. What is the oldest System you expect to support?
If you are OK with the Bourne Shell from SVr4 (OpenSolaris) that represents the feature development state from around 1990 + some bug fixes, you may like to check http://sourceforge.net/projects/schilytools/files/ and use the binary "osh" that is the unenhanced ported version of the SVr4 Bourne Shell. Schily (talk) 16:34, 22 July 2014 (UTC)
@Schily:, thanks for answering, but "lintsh does not exist" - a misunderstanding? Note it's not a shell, see link. Is the bourne shell generally considered the "oldest Unix shell"? Not just supported currently. I mean, the older two (more?) are they considered a historical curiosity from Ancient Unix? comp.arch (talk) 11:49, 23 July 2014 (UTC)
"Unix was originally written in assembly language.[6] Ken Thompson wrote B, mainly based on BCPL, based on his experience in the MULTICS project. B was replaced by C, and Unix, rewritten in C" - portability has been one of the major point of Unix (the OS itself, and at least some subset of (conformiing) programs). Obviously this doesn't apply to apply to the assembly version (for 18-bit PDP-7!). Can you write a portable script all the way back to the very first Unix (or even Multics?)? [The actual C-programs wouldn't work (as Unix older than C)?!] What would that subset of shell functionally to be (Turing complete?)? I'm also considering actual shell interaction. If what is only portable in incoking program, that is not meaningfully differenct from say DOS. Pipes are as old as Unix (not in Thompson, nor scripting - that version not considered a first shell/Unix?) shell at least (and more powerful than in DOS, way back then?)? comp.arch (talk) 12:15, 23 July 2014 (UTC)
I'm not expecting to support anything, just considering portability, say now we take UTF-8 for granted, that is however not in the minimal Unix subset, but 7-bit ASCII is a part of it. I'm not even sure you would use that in portable Unix? One of the core principle of Unix to me are strings of bytes (files). As first use was 18-bit, was the byte 18/3=6 bit then? C(?)/POSIX now requires the byte to be at least 8-bit but C didn't at the time. comp.arch (talk) 12:34, 23 July 2014 (UTC)
Pipes are not in UNIX since for ever, they have been invented in 1974. I was in a talk from Steve Bourne where he explained what happened when they invented the Pipes...
Note that UTF-8 can definitely not be assumed, the most frequently seen coding on UNIX is still ISO-8859-1. UTF-8 is something "very new" (introduced past 1995).
Today, nobody needs to be compatible to the Tompson shell or the Mashey shell.
It seems that the portable Bourne Shell is a good test candidate. Note that "lintsh" is planned but does not exist, so the only option you have may be to test against the portable Bourne shell Schily (talk) 14:32, 23 July 2014 (UTC)
Ok, thanks. Were these Thompson and Mashey the only pre-Bourne shells? And not really considered part of Unix(-like) according to Unix philosophy? Do you consider Unix-compatibility different from shell-compatibility. I'm not sure but shell-compatibility could be older, that is, a given C program can be made pretty portable for running on a pretty old Unix (up to almost newest one? - those having C compiler, first Unix is older than C, but was a C compiler made that old hardware it ran on?). If there is a Turing compatible subset of shell features in Bash (or older) that runs on previous shells, shell programs could run on Unix down to Mashey-shell?
Or did Unix in a way kind of "start" with Bourne? Around V7? Everything else considered Ancient and not thought of for compatibility reasons? Are C program to Unix API the oldest compatible versions og Unix programs? Runnable individually but not from a shell. Could be..
I assumed time sharing had also always been in Unix, but not so.. I guess pipes as in Unix (not DOS) depend on multitasking that's basically implied by time sharing.
In a trivial sense I assume running a single (or series) program was available in the early shells from the keyboard. At least Thompson didn't have scripting. What they mean with no scripting could be not from a file or in general? (and #/bin/sh convention started with - I guess Bourne, and no other previous shells had similar?). PWB/Mashey: "The if and goto commands were made internal to the shell" (as in from the keyboard only not in files?). Seems enough for Turing complete.. and you could make scripts then in that shell that are forward compatible to Bourne? Or was it a different syntax? And confused about "made internal" - for scripts? I'm confused how that would work.. (know about /bin/true and /bin/false however). comp.arch (talk) 17:55, 23 July 2014 (UTC)
I know with UTF-8 (can be relied on now, unless running really old software), but ISO-8859-1 is also "new". That is newer than 7-bit ASCII. Unix doesn't care too much about 8-bit codepage (multi-byte I assume later, and then UTF-8). But The byte has not always been 8-bit so ISO-8859-x wouldn't have worked.. But maybe not even 7-bit ASCII was my point? Maybe only six-bit character code was relied on? Not that I can find, C is/was portable to 6-bit, and OSes that use I guess, Unix might have started with 7-bit ASCII.. 18öbit word PDP-7 can be dived in 9-bit, maybe that was it for C's byte there.. Anyway this is not too important.. comp.arch (talk)
"8-bit clean – SVR3 shell (1986)" means? To me it implies 7-bit ASCII was used (if that to begin with). I see now, much of what you take for granted (because the other shells died..) in shells/Unix (environment variables, comments). While the shell is 8-bit clean does if just support 8-bit charsets but also 7-bit systems/charsets? Or are non-8-bit byte systems now excluded? comp.arch (talk) 10:23, 25 July 2014 (UTC)
8-bit clean means that the shell no longer uses the top bit of a 8-bit character to code this character as a quoted char. In 1986, ISO-8859-1 did become popular and was desired by people outside the USA- Support for multi byte chars was added in 1990 with SVr4 changes. At that time there still was no UTF-8 but AT&Ts EUC. Schily (talk) 10:45, 25 July 2014 (UTC)
Thanks, knew that, redirecting this specific question (not shell compatibility in general) to Talk:18-bit. Old-timers might know there. comp.arch (talk) 12:03, 25 July 2014 (UTC)