No brace expansion for ash?

Mike Frysinger vapier at gentoo.org
Mon Jul 11 16:36:13 UTC 2011


On Mon, Jul 11, 2011 at 05:27, Chris Rees wrote:
> On 11 July 2011 09:48, Laurent Bercot wrote:
>>> if *you* want a minimal POSIX compliant shell out of busybox with no bash
>>> features, you can already do that today.  but *your* needs are not the
>>> same as everyone else's
>>
>>  Please stop misunderstanding my needs and misrepresenting my position
>> (voluntarily or not), and read my first message again.
>>
>>  I am not opposed to the additions of bashisms to hush, or even ash for
>> that matter.
>>  All I am saying is that if hush's objective is to emulate bash and not
>> sh, *this should be made abundantly clear and documented*. People should
>> know exactly what they are getting when they build hush.
>
> Really, this is what I would be happy with too. I have no problem with
> bashisms in hush -- it's a 'Busybox-ism'. The problem I have is having
> an ash that doesn't behave like an ash

if you dont want features in ash, then dont configure them in.  if you
want portability for your scripts, then stick to POSIX.

> cat <<EOF
> #!/bin/sh
>
> mkdir {build src bluurgh}
>
> cd build || echo "WHY ISN'T SH BASH???"
>
> EOF

guessing you meant to use "cat <<EOF > test.sh" and then execute
"test.sh".  beyond that, i'm guessing you also meant to use commas in
the middle of that brace instead of spaces as your current code for
all shells (bash, POSIX sh, dash, ash, etc...) creates three dirs:
"{build" "src" "bluurgh}"

> then testing them with ash, it working fine and then being surprised
> when it breaks for others.

again, that's your business which has no bearing on what people choose
to do on their own systems.
-mike


More information about the busybox mailing list