[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    [BusyBox] Re: hush patch
From:       larry () doolittle ! boa ! org
Date:       2001-04-30 19:57:57
[Download RAW message or body]

Erik -

> On Mon Apr 30, 2001 at 05:20:12AM -0700, larry@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



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic