Hi GNU,

There appears to be a logical bug in the Bash Manual
<http://www.gnu.org/software/bash/manual/bash.html#Definitions>.

It claims that an operator is:

"a control operator or a redirection operator. [...] Operators contain at
> least one unquoted metacharacter."


Neat! It also says that a metacharacter "is a blank or one of the following
characters: ‘|’, ‘&’, ‘;’, ‘(’, ‘)’, ‘<’, or ‘>’." Performing parameter
expansion on blank, we see the definition is most completely:

"a space or tab character or one of the following characters: ‘|’, ‘&’, ‘;’,
> ‘(’, ‘)’, ‘<’, or ‘>’."


This creates a problem with the definition of control operator, which is

"a newline or one of the following: ‘||’, ‘&&’, ‘&’, ‘;’, ‘;;’, ‘|’, ‘|&’, ‘
> (’, or ‘)’".


In short, the definition of operator incorrectly implies that, because
newline is a control operator, newline is also a metacharacter.

A proper fix could be to change the definition of operator to be "a control
operator or a redirection operator. [...] Operators contain at least one
unquoted metacharacter or an unquoted newline character."

Thanks for your time,
George Gallo

Reply via email to