This is absolutely my last post on the subject.
Daniel Veillard wrote:
On Sat, Jan 25, 2003 at 02:59:56PM -0600, Roger Glover wrote:
Mike Brown wrote:
Some shells have a 'noclobber' option that controls whether or
not '>' will overwrite an existing file or raise an error. How
you set this option depends on what shell you're using.
#!/bin/sh implies Bourne shell,
In Posix-compliant systems (most modern UNIX variants, including all
formulations of Linux I have used), it implies Korn shell. The original
Bourne shell does not have a "noclobber" feature at all.
Wrong... all unix I used had a Boune shell for /bin/sh
I assume your "used" is significantly past tense then. Those who are
interested should check this link:
http://www.uni-ulm.de/~s_smasch/various/shells/
which, though far from complete, is much more complete than either my
recollections or Daniel's.
My recent experience tends to run to those systems who have adopted the
POSIX shell for "/bin/sh", so it has skewed my worldview. Those systems
include:
o AIX 4+
o HP-UX 10+
o IRIX 6+
All three use ksh as their Posix-compliant shell. Before these experiences
I was an employee of Cray Research, which was the first to use the Korn
Shell as it's Posix-compliant "/bin/sh" back in the mid-90's.
The main holdout that have used commonly is Solaris. In my last major
Solaris assignment the sys admin was a Posix-lover who hand-changed the
system to use "/bin/bsh" for Bourne shell and "/bin/sh" for Posix-compliant.
Korn shell is "ksh" a version used on System V and AIX, but certainly
not as /bin/sh, the syntax was hugely different.
David Korn's shell syntax is, without exception, a superset of Steven
Bourne's shell syntax.
All Linux ship with bash "Bourne Again shell" as /bin/sh
which is backward compatible with the Bourne shell. This is actually
stipulated by the Linux Standard Base.
Here I really blew it. Mea maxima culpa. From practice, I knew that the
Linux shell was Posix-compliant, but I did not know it was bash. Back in
the early '90's when I first saw bash, it was definitely not like the Korn
shell. Furthermore, there was no Posix shell yet, only a committee armed
with David Korn's 1988 spec and his 1993 source code. I assumed on this
basis the "Posix shell implementation"=="Korn shell". Again, my apologies
for posting this grossly incorrect information.
To the very best of my understanding, everything else I posted in that
message, *ESPECIALLY THE ALTERNATIVE SHELL SCRIPT*, is completely correct.
-- Roger Glover
glover_roger(_at_)yahoo(_dot_)com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list