In article <1297175842.3030.25.camel@homebase>, [email protected]
(Paul Smith) wrote:

> *From:* Paul Smith <[email protected]>
> *To:* [email protected]
> *CC:* [email protected]
> *Date:* Tue, 08 Feb 2011 09:37:22 -0500
> 
> On Tue, 2011-02-08 at 12:40 +0000, David Collier wrote:
> > Ah.... I've had another look at this
> > 
> > bash _allows_ the round brackets as in
> > 
> > func2 () 
> > {
> > }
> > 
> > but on further examination, they are apparently redundant 
> > syntax!!!!!
> 
> I'm not sure what you mean.  The parentheses are definitely NOT
> redundant; you cannot leave them off.  Without them you don't have a
> function definition, not in any POSIX-based shell (including bash)
> anyway.
> 
>         ~$ foo { echo bar; }
>         bash: syntax error near unexpected token `}'
>         ~$ foo () { echo bar; }
>         ~$ foo
>         bar

OK - I always thought that there was a fundamental incompatibility
between the syntax for bash functions and that for ash

But I couldn't recall the details when challenged above.

so

bash has

    function fred{}
 or
    fred(){}
    
and ash has

    fred{}
    
which means I was right originally - bash and ash scripts containing
functions are syntactically incompatible.

yes ?????

D.

_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to