From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from euclid.skiles.gatech.edu (list@euclid.skiles.gatech.edu [130.207.146.50]) by coral.primenet.com.au (8.7.5/8.7.3) with ESMTP id PAA01134 for ; Mon, 12 Aug 1996 15:14:22 +1000 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id BAA01521; Mon, 12 Aug 1996 01:02:39 -0400 (EDT) Resent-Date: Mon, 12 Aug 1996 01:02:39 -0400 (EDT) From: Zefram Message-Id: <9940.199608120500@stone.dcs.warwick.ac.uk> Subject: Re: sh compatibility again :-> To: schaefer@nbn.com Date: Mon, 12 Aug 1996 06:00:56 +0100 (BST) Cc: hzoli@cs.elte.hu, borsenkow.msk@sni.de, zsh-workers@math.gatech.edu In-Reply-To: <960811213634.ZM4881@candle.brasslantern.com> from "Bart Schaefer" at Aug 11, 96 09:36:34 pm X-Loop: zefram@dcs.warwick.ac.uk X-Stardate: [-31]7951.04 X-US-Congress: Moronic fuckers MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Resent-Message-ID: <"fjm_E1.0.fN.lhh3o"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/1942 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu >Right; if I recall correctly, bash and ksh both permit stuff like: > >$ echo "foo `echo "bar baz"` boing" > >That is, bash and ksh nest double quotes inside backticks. Old-fashioned >Bourne shell, on the other hand, does NOT permit nesting of double quotes, >even inside backticks. ... >The only way to resolve this would be with yet another option, SH_QUOTES >or some such. Worth it? Dunno. Not worth it. POSIX leaves the behaviour undefined IIRC, and there's no advantage in the traditional behaviour. >} I'll try to write a configure check for the echo style of /bin/sh and use >} that. > >Eww, no. Let's pick one behavior and stick with it, please. The default >options, even in an emulation mode, shouldn't vary from one installation >to the next! It's been a long time since I encountered an sh that didn't >have a builtin SysV-style echo -- BSD_ECHO is needed mostly for csh >compatibility. I'd vote for leaving BSD_ECHO off when run as "sh". I also recommend against a configure check, but for a different reason: some widespread shs (notably SunOS and Solaris) vary their echo behaviour depending on $PATH, trying to emulate what would happen if echo weren't a builtin. It's really quite difficult to reliably detect this behaviour. I suggest that the behaviour should remain as it is. -zefram