[BusyBox] Re: hush patch
larry at doolittle.boa.org
larry at doolittle.boa.org
Mon Apr 30 19:57:57 UTC 2001
Erik -
> On Mon Apr 30, 2001 at 05:20:12AM -0700, larry at doolittle.boa.org wrote:
> > It's something of
> > a mystery to me as to why bash treats
> > if
> > true; then echo foo; fi
> > and
> > if; true; then echo foo; fi
> > differently: the first echos foo, the second is an error.
> > I haven't tried this on other shells.
I tried it on ash. My patch matches ash behavior. Bash seems to
dislike null commands, hush and ash think they're OK.
bash> true; ;true
bash: syntax error near unexpected token `;t'
bash> true;;true
bash: syntax error near unexpected token `;t'
bash>
ash> true; ;true
ash> true;;true
Syntax error: ";;" unexpected
ash>
hush> true; ;true
hush> true;;true
hush>
That hush mismatch with ash might disappear if I ever get
to the point of attempting case statements.
- Larry
More information about the busybox
mailing list