Path: utzoo!attcan!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!husc6!paperboy!meissner From: meissner@osf.org (Michael Meissner) Newsgroups: comp.unix.shell Subject: Re: bourne shell query Message-ID: Date: 9 Sep 90 21:42:17 GMT References: <75@iconsys> <925@hls0.hls.oz> <1990Sep7.193010.26787@dg-rtp.dg.com> Sender: news@OSF.ORG Organization: Open Software Foundation Lines: 38 In-reply-to: goudreau@dg-rtp.dg.com's message of 7 Sep 90 19:30:10 GMT In article <1990Sep7.193010.26787@dg-rtp.dg.com> goudreau@dg-rtp.dg.com (Bob Goudreau) writes: | In article , meissner@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@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?