RFC: 3 shells (ash, dash, bash), 3 different behaviours
Cristian Ionescu-Idbohrn
cristian.ionescu-idbohrn at axis.com
Fri Mar 21 09:49:14 UTC 2014
On Thu, 20 Mar 2014, Cristian Ionescu-Idbohrn wrote:
> On Thu, 20 Mar 2014, Denys Vlasenko wrote:
> >
> > Did you find a real-world script which does depend on
> > previous value of "local" variable? Please show it.
>
> Alright. See attached.
> Run it with:
>
> $ dash /path/to/foo.sh
> $ bash /path/to/foo.sh
> $ /path/to/busybox ash /path/to/foo.sh
I probabably owe an explanation for the script example attached to the
previous message.
Variable 'foo' contains the output from a dbus-send command.
Function `f' is supposed to return the 'fps' of an mjpeg video stream
with a 1920x1080 resolution.
Running the script under dash does that for me and so did busybox
ash, until recently. What I now have to do is to identify all scripts
that do things like:
IFS=":$IFS"
^^^^
and replace the marked part with verbatim <space><tab><newline>. And
that will keep me busy for a while, with the uncertainty that I didn't
locate all such places.
Cheers,
--
Cristian
More information about the busybox
mailing list