Subject: Re: sh: unbalanced ' in ` not detected
To: Hubert Feyrer <>
From: David Laight <>
List: tech-userlevel
Date: 10/27/2007 19:10:26
On Sat, Oct 27, 2007 at 04:59:01PM +0200, Hubert Feyrer wrote:
> Note the unbalanced ' within the ` here:
> 	echo `echo 'foo`
> This fails in bash and NetBSD's ksh, but not in NetBSD's sh
> (and neither on Solaris' /bin/sh, /usr/xpg4/bin/sh and /bin/ksh).
> Is this expected? No, I haven't checked SUSv3, but my gut feeling tells me 
> our /bin/sh is not right here.
> FWIW, I've discovered this while trying to build pkgsrc/lang/tcl83 on 
> Linux. While I'll fix the package, I do think that our /bin/sh needs a 
> whack over the head. Anybody got a cluebat? :)

I've got several, but the rules for quoting in 'sh' are baroque, and
netbsd's /bin/sh (aka ash - at least once in its history) implementation
will be different from anything else (every one its own rat's nest).


David Laight: