bourne shell query

Michael Meissner meissner at osf.org
Mon Sep 10 07:42:17 AEST 1990


In article <1990Sep7.193010.26787 at dg-rtp.dg.com>
goudreau at dg-rtp.dg.com (Bob Goudreau) writes:

| In article <MEISSNER.90Sep6122432 at osf.osf.org>, meissner at osf.org
| (Michael Meissner) writes:
	...
| > The standard way of dealing with this is:
| > 
| > if [ x"$1" = x"$2" ]; then
| > 	echo "Yeas!"
| > else
| > 	echo "No-way!"
| > fi
| 
| Why is even the "x" method necessary?  My system's Bourne shell
| (a port of V.3.2's sh) doesn't have any problem handling '=' or
| '-t' in the example Scott Yelich describes above.  Is this something
| AT&T fixed in the last couple of years?

It depends on whether you are trying to write maximally portable shell
scripts.  V7-based systems required this, because test was just
another command, and not handled by the shell.

BSD can't include the system V.2 shell (or anything else) because it
would mean that current BSD users would have to get a System V.2
license (which I don't think is offered anymore).  A System V.3
license is on the order of $60,000 for commercial sites, and V.4 is
rumored to be $100,000 (I know there are provisions for lower
university prices, but I don't have any data on them).  Also, the
'recent' AT&T licenses have had things various people have objected to
in the past (and to be fair there are people who can't sign the latest
BSD licenses, and I'm sure there are people who have problems with OSF
licenses).
--
Michael Meissner	email: meissner at osf.org		phone: 617-621-8861
Open Software Foundation, 11 Cambridge Center, Cambridge, MA, 02142

Do apple growers tell their kids money doesn't grow on bushes?



More information about the Comp.unix.shell mailing list