On 1/3/24 8:41 AM, Oğuz wrote:
See:

     $ ${ case } in }) echo uname; esac }
     Linux
     $ ${ case }x in }x) echo uname; esac }
     bash: command substitution: line 25: syntax error near unexpected token `x'
     bash: command substitution: line 25: `    }x)'
     $ ${ case }x in \}x) echo uname; esac }
     Linux
     $

I don't think this should be a syntax error because the closing brace
is not in a place it can terminate the command substitution.

I agree. It looks like a problem with reconsituting the text of the command
substitution from the parse tree. I'll fix it for the next devel branch
push.

Chet
--
``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/


Reply via email to