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 MAA00201 for ; Mon, 12 Aug 1996 12:41:58 +1000 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id WAA29438; Sun, 11 Aug 1996 22:29:08 -0400 (EDT) Resent-Date: Sun, 11 Aug 1996 22:29:08 -0400 (EDT) From: Zoltan Hidvegi Message-Id: <199608120218.EAA03734@hzoli.ppp.cs.elte.hu> Subject: Re: sh compatibility again :-> To: borsenkow.msk@sni.de Date: Mon, 12 Aug 1996 04:18:57 +0200 (MET DST) Cc: zsh-workers@math.gatech.edu In-Reply-To: from Andrej Borsenkow at "Aug 8, 96 07:13:48 pm" X-Mailer: ELM [version 2.4ME+ PL17 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Resent-Message-ID: <"d2K3H2.0.sB7.qRf3o"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/1938 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Andrej Borsenkow wrote: [...] > 1. It doesn't like malformed constructs like > > A="`cat /some/file" (note missed backtick) > > zsh tries to parse command substitution behind closing double-quote, and > ends up with `missing "' at the end of script. Our /bin/sh stops at > closing double-quote. In POSIX the result is undefined - thus, techically > neither violate it. I copied the behaviour of bash here. pdksh also behaves this way. > But the following things could probably be fixed > > 4. Traditional /bin/sh interprets `set -' as set +xv. It could be well > undocumented (it is not on our system) but still is so. Could anybody test > it on more than one systems? zsh silently sets positional parameters to > null. At least on our system many startup scripts include > > set -$DEBUG > > at the script start (intent is to set DEBUG=x somewhere in /etc/rc2 to see > what's going on). Under zsh, script just loses its arguments and ends up > with error (it is SVR4 startup scripts are called with > /bin/sh /etc/rc2.d/S*something start > if `start' is not there, script just exits). OK. I've changed that. set - will be the same as set +xv and set - args will be the same as set +xv -- args. This will not be documented since it is just an obsolecent compatibility feature and noone should use that. > 5. Currently zsh sets BSD_ECHO when running as sh. Our sh does support > escapes in echo; I recall that SCO sh does it as well. I don't know about > others. What about relaxing it? If scripts doesn't rely upon escapes in > echo, it would make no harm. I'll try to write a configure check for the echo style of /bin/sh and use that. Zoltan