On 4/24/17 6:59 AM, wer...@suse.de wrote: > Bash Version: 4.4 > Patch Level: 12 > Release Status: release > > Description: > Since 4.3 including 4.4 bash shows a bug in loops using nested ((...)), > $((..)), and $(...) > > Repeat-By: > The bash code > > V_NAME=Friday > for (( INDEX=0; INDEX<$((10-$(expr length $V_NAME))); INDEX++ )) > do > echo $INDEX > done > > leads to > > bash: syntax error near unexpected token `newline'
Thanks for the report. It's a consequence of recursively invoking the parser for the command substitution, which bash-4.3 and later do. There's more and more yacc/bison internal state I find out about as these semi- obscure reports come in. I'll fix it. 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://cnswww.cns.cwru.edu/~chet/