shz@hlexa.UUCP (Beverly Dyer) (06/13/84)
Are there advantages to installing ksh as /bin/sh? (Besides cleaning up .profile files) Are there standard shell routines which don't run under ksh, or any other problems with installing ksh as /bin/sh? Beverly Dyer hlexa!bev
daa@druxh.UUCP (AndrieDA) (06/18/84)
<Sacrifice to the God of Net Bugs>
Installing "ksh" as "/bin/sh" may have a few problems. We started
using "ksh" several months ago, and noted a few problems with
old shell scripts:
> A common practice here, when needed, was to save the
current working directory in the variable "PWD",
and "cd" to it later. "ksh" changes "PWD" every
time "cd" is executed. Important shell scripts should be
checked for all such reserved words before the change.
While we have not installed "ksh" as "/bin/sh", setting the
variable "SHELL" in the environment simulates this. We noted that
the performance of "make" was seriously affected (~20%) because every
time "make" started "ksh", "ksh" read in the startup file (set in "ENV").
We consider this unacceptible and will argue with our ComCenter
before allowing "ksh" to replace "/bin/sh".
Donald Andrie (druxh!daa)
adm@cbneb.UUCP (06/20/84)
#R:druxh:-77000:cbnap:27300003:000:684 cbnap!whp Jun 20 13:30:00 1984 > While we have not installed "ksh" as "/bin/sh", setting the > variable "SHELL" in the environment simulates this. We noted that > the performance of "make" was seriously affected (~20%) because every > time "make" started "ksh", "ksh" read in the startup file (set in "ENV"). What do you keep in the $ENV file?? It should be used for aliases, setting the prompt, and not much else. These type of operations execute very fast, since the're built into ksh (alias for example). Prehaps your problem is that you have too much stuff in the $ENV file that could be put elsewhere (i.e., .profile). We have been using ksh for some time, and have not noticed any performance drop.
mats@dual.UUCP (Mats Wichmann) (06/21/84)
Regarding ksh slowing down MAKE if installed as /bin/sh...if you keep the old shell around, usually a good idea anyway (perhaps as /bin/bsh? or /bin/osh?), setting the line `SHELL=/bin/osh' in your makefile will fix this. Odious to have to change your makefiles, but worth remembering in case of trouble... [ From one who has been bitten by `sh' constructs in my makefiles, only to find that `csh' was being used as the shell....] Mats Wichmann Dual Systems Corp. ...{ucbvax,amd70,ihnp4,cbosgd,decwrl,fortune}!dual!mats