On 11/15/17 5:13 AM, Stephane Chazelas wrote: > Hello, > > $ bash -c 'for ((i = 0; $(echo 0); i++)); do echo x; done' > > (OK) > > $ bash -c 'for ((i = 0; ${x-`echo 0`}; i++)); do echo x; done' > > (OK) > > $ bash -c 'for ((i = 0; ${x-$(echo 0)}; i++)); do echo x; done' > bash: -c: line 0: syntax error near unexpected token `newline' > bash: -c: line 0: `for ((i = 0; ${x-$(echo 0)}; i++)); do echo x; done' > > It's the same for ${x#$(echo 0)}.
This was fixed in the devel branch at the end of April, 2017. -- ``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/