On 10/13/20 11:43 PM, Martin Schulte wrote: > Consider the following script: > >>>> > #!/bin/bash > > echo "${x;:-}" ; echo "Not executed" > echo "Executed" > > echo "${x:-}" ;; echo "Not executed" > echo "Not executed" > <<< > > It just a source of problems that the two syntactical errors (both caused by > an extra semicolon) lead to different behaviour.
They are not both syntax errors. The first is a word expanion error. The second is a syntax error because `;;' is an operator and it's not valid in that context. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU c...@case.edu http://tiswww.cwru.edu/~chet/