Is SVR2 /bin/sh backwards compatible to v7?

David Elliott dce at stan.UUCP
Sat Feb 4 03:16:08 AEST 1989


In article <57653 at pyramid.pyramid.com> csg at pyramid.pyramid.com (Carl S. Gutekunst) writes:
>In article <165 at apmpyr.nzapmb.co.nz> pgfdp at nzapmb.co.nz (Paul Fox ) writes:
>>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:
(differences deleted)

There is one other item that bites people.  The SVR2 shell added the
ability to indent text read in using <<.

That is, you can say

	cat <<-EOF
		data
		...
	EOF

and it works as if it were

	cat <<EOF
	data
	...
	EOF

The problem is that a number of users got into the habit of using
termination strings beginning with -, as in

	cat <<-E-O-F-
	...
	-E-O-F-

This breaks without any kind of warning.  It still boggles me as
to why the implementors chose the legal '-' instead of an illegal
character, such as '#'.

-- 
David Elliott		...!pyramid!boulder!stan!dce



More information about the Comp.unix.wizards mailing list