bug-bash
[Top][All Lists]
Advanced

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

Re: Shell Grammar man page function definition


From: Greg Wooledge
Subject: Re: Shell Grammar man page function definition
Date: Sun, 28 Feb 2021 12:57:41 -0500

Mike Jonkmans (bashbug@jonkmans.nl) wrote:
> What does not work:
>       function x ( : )

The parser is looking for () after the function name.  Most likely, the
opening ( is confusing it.

unicorn:~$ bash
unicorn:~$ x() ( : )
unicorn:~$ function y() ( : )
unicorn:~$ type x
x is a function
x () 
{ 
    ( : )
}
unicorn:~$ type y
y is a function
y () 
{ 
    ( : )
}



reply via email to

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