No brace expansion for ash?

Davide louigi600 at yahoo.it
Sun Jul 10 05:09:01 UTC 2011


As a busybox user I feel I've something to say regarding this matter:

Fistrsly I'd like to thanks all the developers and pacth contributors for the work they put in to this project that is freely available.

Secondly ash is ash and hush is a small bash derivate so having bashism in ash might be an odd thing while having some bashism in a small bash derivare would be normal.

Thirdly I somewhat disagree that using for instead of brace expansion would make any shell script more readable:

mkdir -p /usr/local/people/{me,you,others}

mkdir -p /usr/local/people/me /usr/local/people/you /usr/local/people/others

for DIR in /usr/local/people/me /usr/local/people/you /usr/local/people/others
do
  mkdir -p $DIR
done

These 3 examples do the same thing and although some might not like my indentation in the third example I'd be worried if anyone would rather write any for of that "for" instead of the firs 2 examples !

Regards
David


> <eric.martin at gmx.net>
> wrote:
> > Hello Robert,
> >
> >> Well, I guess you don't get the term "FOSS" right
> here. Complaining
> >> about people ("it's a pity no one is interested")
> because they don't do,
> >> what _you_ want, is not the key to anything.
> >
> > Perhaps my english is not so good, finally. :-\
> > I'm not reproaching the developers about anything!
> > It was just a question to know why they intergrate
> that function in the
> > "little" shell but not the "big" one.
> >
> >> Provide a patch yourself, if you think this would
> accomplish your perfect
> >> shell.
> >
> > I wish... but unfortunately, I'm not a developer at
> all, simply an
> > appreciative user.
> >
> >> All the others don't seem to like bothering with
> bashisms here... neither
> >> do I. ;)
> >
> > Oh... so why do they integrate bashisms in ash/hush?
> 
> 
> It's undocumented and IMO undesirable. Assume they don't
> work.
> 
> 
> >> Btw. zsh expands {0..9} but it doesn't expand
> {A..Z}. In the future
> >> there could be a HALF_EXPAND_BASHISM macro for zsh
> emulation. :D
> >
> > Yeah, good idea! Just kidding. :-)
> >
> 
> If you want to use Bash features, use Bash.
> 
> If you want to write a sh script, write it in sh; anything
> that you're
> using brace expansion for can be written (more clearly as
> well) using
> for -- or alternatively use bash.
> 
> Perhaps if you explained why you actually want to use ash
> as your
> interactive shell maybe someone could help you.
> 
> Chris
> _______________________________________________
> busybox mailing list
> busybox at busybox.net
> http://lists.busybox.net/mailman/listinfo/busybox
> 


More information about the busybox mailing list