From: Johannes Sixt Date: Fri, 15 Jan 2010 08:30:48 GMT Subject: Re: [PATCH v2] Test t5560: Fix test when run with dash Message-ID: <4B5027B8.2090507@viscovery.net> In-Reply-To: <1263537842-5792-1-git-send-email-tarmigan+git@gmail.com> Tarmigan Casebolt schrieb: > REQUEST_METHOD="GET" some_shell_function > I can't tell from my reading of the POSIX spec whether my usage was > wrong or if dash is wrong, According to POSIX, variables set as shown above for shell functions are not exported and retain their value after the function returns. I would not be surprised if dash got this right, and the tests fail because they were written for bash, which gets it wrong. In particular, f() { sh -c 'echo +$v+'; } v=x f echo +$v+ sh -c 'echo +$v+'" Should print ++ +x+ ++ I can test only ash, bash, zsh, and ksh, of which only ksh gets it right. -- Hannes