Subject: bin/33956: -current /bin/sh small regression with $@ in functions
To: None <gnats-admin@netbsd.org, netbsd-bugs@netbsd.org>
From: None <njoly@pasteur.fr>
List: netbsd-bugs
Date: 07/09/2006 13:20:00
>Number: 33956
>Category: bin
>Synopsis: -current /bin/sh small regression with $@ in functions
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Jul 09 13:20:00 +0000 2006
>Originator: Nicolas Joly
>Release: NetBSD 3.99.21
>Organization:
Institut Pasteur, Paris.
>Environment:
System: NetBSD cixy.dial.pasteur.fr 3.99.21 NetBSD 3.99.21 (CIXY) #21: Sun Jul 9 10:41:55 CEST 2006 njoly@cixy.dial.pasteur.fr:/local/src/NetBSD/obj/i386/sys/arch/i386/compile/CIXY i386
Architecture: i386
Machine: i386
>Description:
I noticed that the following shell code does not produce the expected output
(note the missing dots ...) anymore with -current /bin/sh (it works with ksh
and zsh on the same machine, and with sh from 3.0):
njoly@cixy [tmp/sh]> cat foo.sh
echocheck() { echo -n "Checking for $@ ... "; }
echocheck "foo bar"; echo "ok"
echocheck "foo_bar"; echo "ok"
njoly@cixy [tmp/sh]> /bin/sh ./foo.sh
Checking for foo barok
Checking for foo_barok
njoly@cixy [tmp/sh]> /bin/ksh ./foo.sh
Checking for foo bar ... ok
Checking for foo_bar ... ok
njoly@cixy [tmp/sh]> /local/bin/zsh ./foo.sh
Checking for foo bar ... ok
Checking for foo_bar ... ok
>How-To-Repeat:
Simply run the previous example, and check the output
>Fix:
don't know