Xref: utzoo comp.sys.pyramid:309 comp.unix.wizards:14489 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!ukma!xanth!lll-winken!lll-lcc!pyramid!csg From: csg@pyramid.pyramid.com (Carl S. Gutekunst) Newsgroups: comp.sys.pyramid,comp.unix.wizards Subject: Re: Is SVR2 /bin/sh backwards compatible to v7? Message-ID: <57653@pyramid.pyramid.com> Date: 3 Feb 89 09:34:26 GMT References: <165@apmpyr.nzapmb.co.nz> Organization: Pyramid Technology Corp., Mountain View, CA Lines: 38 In article <165@apmpyr.nzapmb.co.nz> pgfdp@nzapmb.co.nz (Paul Fox ) writes: >... our development and our applications all run in the "ucb" universe.... >When writing shell scripts and makefiles, it would be nice if we could >make use of the bug fixes and enhancements that have gone into /bin/sh >since v7, that is, be able to run the AT&T /bin/sh instead of the UCB >/bin/sh. > >Does anyone see a problem with simply _replacing_ the UCB /bin/sh (i.e. the >one called /.ucbbin/sh) with the AT&T shell (the one called /.attbin/sh)? This may actually work, if only because most of the shell scripts in BSD are pretty straight-forward. The differences in the System V shell I am aware of are: - test(1) is built in, and returns different values for directories. Since the System V test(1) returns values that are more correct than the BSD test(1), it seems unlikely that this would break anything. - Executable names are hashed. (The C-Shell does this too, although the im- plementation is quite different.) I've seen a number of cases where scripts that create executables and then invoke them work as expected on the old V7 shell, but get confused by the System V shell. There are a few scripts in OSx that are sensitive to this, though all of them I've seen explicitly invoke "#!/bin/att /bin/sh" to force them into the System V shell. - echo(1) is built in, and the semantics are different, per Doug Gwyn's note. This may actually cause some serious trouble for scripts that expect to be run interactively, or that try to get fancy with output formats. I can't think of any OSx scripts that would be sensitive to this. One thing I *would* expect to see get confused are "Configure" programs, that try to guess what system you are running on. Note that Larry Wall's Configure does not have this problem; it isn't surprised to see a System V shell on a Berkeley system, since Sun has been shipping that for years. FYI, if you are on OSx 4.0 or later, the att universe shell is SVR3.0.