On Tue, Jun 23, 2015 at 10:25 PM, Peng Yu <address@hidden> wrote:
> Hi, "; ;" is a syntax error. Could anybody help me understand why bash
> is defined in this way?
>
> $ ; ;
> -bash: syntax error near unexpected token `;'
>
Because a <separator_op> or <separator> must occur in the context of a
<list>, <and_or>, or <term>, none of which can produce space or empty
string. separator_op linebreak ls valid which is why you can have one
separator by itself on a line.
That said, I don't quite see where $';\n;' becomes an invalid
program. ksh and zsh accept it.