SVR4 /bin/sh BUG

Dan Barrett barrett at jhunix.HCF.JHU.EDU
Fri Jun 14 06:55:16 AEST 1991


>In article <377 at audfax.audiofax.com> arnold at audiofax.com (Arnold Robbins) writes:
>|Amen.  There's no reason to ship *three* stupid shells.  ksh should have
>|been installed as /bin/sh and that's it.

	It's not necessary that simple.  You see, ksh is NOT an exact
superset of sh on all flavors of UNIX.  (I don't know about SVR4, though.)
Therefore, standard sh scripts can break under ksh.

	For example, the code:

		while [ foo ]
		do
			command
		done > outfile

spawns a subshell in sh, but not in ksh, on some flavors of UNIX.  This
can have a direct effect on variable values, for example.

                                                        Dan

 //////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
| Dan Barrett, Department of Computer Science      Johns Hopkins University |
| INTERNET:   barrett at cs.jhu.edu           |                                |
| COMPUSERVE: >internet:barrett at cs.jhu.edu | UUCP:   barrett at jhunix.UUCP    |
 \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/////////////////////////////////////



More information about the Comp.unix.amiga mailing list