[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bash-4 breaks $(<command>) syntax on FreeBSD
From: |
Chet Ramey |
Subject: |
Re: Bash-4 breaks $(<command>) syntax on FreeBSD |
Date: |
Thu, 12 Mar 2009 17:29:21 -0400 |
User-agent: |
Thunderbird 2.0.0.19 (Macintosh/20081209) |
Gerard wrote:
> Fair enough. I know that several users of FreeBSD are complaining all
> ready and have switched back to Bash-3.x.
>
> This is a short script, named "t.sh" that will produce the error
> message:
>
> #!/usr/bin/env bash
>
> if $(which gpg2); then
> printf "gpg2 located"
> fi
>
> This is the error message:
>
> ./t.sh: command substitution: line 4: syntax error near unexpected
> token `)' ./t.sh: command substitution: line 4: `which gpg2)'
>
> Even something as simple as:
>
> echo $(uname)
>
> will produce the same error message.
I've corresponded with the FreeBSD port maintainer, and this is due to
the port build using yacc instead of bison. Using bison fixes it. I
don't know why yacc doesn't work yet.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/