ksh incompatabilities with sh?

John Woods john at frog.UUCP
Wed May 25 14:08:00 AEST 1988


In article <546 at zorch.UU.NET>, scott at zorch.UU.NET (Scott Hazen Mueller) writes:
>In article <54188 at sun.uucp> guy at gorodish.Sun.COM (Guy Harris) writes:
>>All I know is that somebody tried [replacing "/bin/sh" with
>>the Korn shell and] a lot of his shell scripts broke.
> When David Korn spoke at the SVNet meeting last month, the question
> of compatibility came up briefly (very!).

I just leafed through the COMPATIBILITY file that came with ksh-i.  Perhaps
David Korn could arrange to post the actual thing, but I'll just give a VERY
brief summary.  It looked to me like the most-commonly-used things that
changed were the handling of IFS (now done later, after parameter and command
substitution); global environment handling (ksh passes modified environment
parameters to children without needing export); and the use of (( to introduce
an arithmetic expression instead of a subshell-in-a-subshell.

I have not yet met an sh script that ksh couldn't handle just fine -- of
course, such exist, but my experience is that they aren't too common.
-- 
John Woods, Charles River Data Systems, Framingham MA, (617) 626-1101
...!decvax!frog!john, john at frog.UUCP, ...!mit-eddie!jfw, jfw at eddie.mit.edu

No amount of "Scotch-Guard" can repel the ugly stains left by REALITY...
		- Griffy



More information about the Comp.unix.wizards mailing list