bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: function grammar


From: Chet Ramey
Subject: Re: function grammar
Date: Tue, 20 Jul 2010 21:46:35 -0400

> I see this in bash(1):
> 
>     SHELL GRAMMAR
>         ...
>         Shell Function Definitions
>             ...
>             [ function ] name () compound-command [redirection]
> 
> and do not see the version you show without the parens.

Read the text following the definition.  It says, in part:

        If  the  function reserved word is supplied, the
        parentheses are optional.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]