Date: Thu, 12 Mar 2009 22:35:32 -0700 (PDT) From: bf <bf2006a@yahoo.com> To: freebsd-questions@FreeBSD.org Subject: Re: Problem with Bash-4 and $(command) syntax Message-ID: <721111.30542.qm@web39104.mail.mud.yahoo.com>
next in thread | raw e-mail | index | archive | help
> > {Problem with Bash-4 and $(command) ...}: > [...] > > I found the same problem, and have reverted to > > bash3.2 until it's sorted out. > > See if the following helps. > > http://tiswww.case.edu/php/chet/bash/COMPAT > > Especially: > > 38. Since bash-4.0 now follows Posix rules for finding the > closing > delimiter of a $() command substitution, it will not behave as > previous > versions did, but will catch more syntax and parsing errors > before > spawning a subshell to evaluate the command substitution. > > -- >Eray Yes, the above is true. But many of the examples cited by people noticing this problem are perfectly valid and _should_ work. The problem is that the port's parser is broken, owing in part to incompatibilities between the system yacc currently used to build the parser and GNU bison, which is used by the people who write bash. This is true of both shells/bash and shells/bash3, but is more noticeable in shells/bash. A fix has been proposed, and patches are available, in the follow-up to: http://www.FreeBSD.org/cgi/query-pr.cgi?pr=ports/101230 The port's maintainer has been reluctant to switch to bison, so this may not be the solution that is ultimately used to fix the port, but you can use these in the meantime. Regards, b.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?721111.30542.qm>