Re: Differing behaviour of shells regarding simple commands with parameter assignments

2013-01-21 Thread Vincent Lefevre
Sorry for replying so late, but I disagree... On 2012-12-26 03:03:57 +0100, Timo Weingärtner wrote: > 2012-12-26, 02:22:45 Cyril Brulebois wrote: > > Timo Weingärtner (26/12/2012): > > > bash, zsh, posh output 121 > > > > > > busybox sh, dash, (m)ksh output 122 > > > > > > checkbashisms doesn't

Re: Differing behaviour of shells regarding simple commands with parameter assignments

2012-12-25 Thread Timo Weingärtner
Hi, 2012-12-26, 02:22:45 Cyril Brulebois wrote: > Timo Weingärtner (26/12/2012): > > bash, zsh, posh output 121 > > > > busybox sh, dash, (m)ksh output 122 > > > > checkbashisms doesn't complain. > > > > Which of the three is wrong? Where shall I file bugs? > > > > When bar is not a function

Re: Differing behaviour of shells regarding simple commands with parameter assignments

2012-12-25 Thread Cyril Brulebois
Hello Timo, Timo Weingärtner (26/12/2012): > bash, zsh, posh output 121 > > busybox sh, dash, (m)ksh output 122 > > checkbashisms doesn't complain. > > Which of the three is wrong? Where shall I file bugs? > > When bar is not a function but an external script the output is 121 > with all the

Differing behaviour of shells regarding simple commands with parameter assignments

2012-12-25 Thread Timo Weingärtner
Hi, I just stepped over a difference between bash and busybox. To illustrate I wrote this simple script: -- #!/bin/sh bar () { echo -n $foo; } foo=1 bar foo=2 bar bar -- bash, zsh, posh output 121 busybox sh, dash, (m)ksh output 122 checkbashisms doesn't complain. Which of