ksh incompatabilities with sh?

Robert Elz kre at munnari.oz
Tue May 24 19:37:45 AEST 1988


In article <4627 at hoptoad.uucp>, gnu at hoptoad.uucp (John Gilmore) writes:
> I have heard this too, over the years, and would like real
> documentation on what's wrong.

Its not a matter of "wrong", its just that there is no sensible way to
extend the sh language (as ksh does) without making it incompatible.

Consider the following trivial (one line) shell script ..

	print $1

when run using the Bourne shell as /bin/sh, and when run using the Korn
shell as /bin/sh.

They're quite likely to do quite different things.

Unfortunately, other that reducing ksh to being a sh clone (with perhaps
some of the keyboard control still there) there's nothing that can be
done about this.

If your site happens not to have any sh scripts that behave differently when
run with ksh, then by all means replace sh.  But don't be too surprised if
you find one or two, or get one or two later.

kre



More information about the Comp.unix.wizards mailing list