On 5/2/17 12:41 AM, Eduardo Bustamante wrote: > On Mon, Apr 24, 2017 at 3:48 PM, Chet Ramey <chet.ra...@case.edu> wrote: > [...] >> That works on Linux, but not on the BSDs, since Posix says it doesn't >> have to. > > I see that a test for this has been added to comsub.tests: > > dualbus@debian:~/src/gnu/bash$ git log -1 -p -- tests/comsub.tests > commit 2a39157723ffb7dfc597dfa46b5b6fbd93cc9ea2 > Author: Chet Ramey <chet.ra...@case.edu> > Date: Mon May 1 15:46:46 2017 -0400 > > commit bash-20170428 snapshot > > diff --git a/tests/comsub.tests b/tests/comsub.tests > index e8fab711..fceea00f 100644 > --- a/tests/comsub.tests > +++ b/tests/comsub.tests > @@ -44,6 +44,12 @@ bar') > # long-standing parse error in all versions up through bash-4.3 > echo ${foo:-$(echo a{b,c})} >/dev/null > > +# parsing problem based on recursively calling bison parser through bash-4.4 > +for (( INDEX=0; INDEX<$((10-$(expr length $V_NAME))); INDEX++ )) > +do > + : > +done > + > ${THIS_SH} ./comsub1.sub > ${THIS_SH} ./comsub2.sub > ${THIS_SH} ./comsub3.sub > > > But in my system (Debian 9, expr from GNU coreutils 8.26-3): > > dualbus@debian:~/src/gnu/bash$ expr length > expr: syntax error
Changing `expr' to `echo' is enough. -- ``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/