bug-bash
[Top][All Lists]
Advanced

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

GNU Bash Manual bug: inconsistent definitions


From: George Gallo
Subject: GNU Bash Manual bug: inconsistent definitions
Date: Tue, 28 Jul 2015 15:01:23 -0400

Hi GNU,

There appears to be a logical bug in the Bash Manual.

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

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