bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bash-4 breaks $(<command>) syntax on FreeBSD


From: Gerard
Subject: Re: Bash-4 breaks $(<command>) syntax on FreeBSD
Date: Thu, 12 Mar 2009 17:05:33 -0400

On Thu, 12 Mar 2009 16:17:45 -0400
Chet Ramey <chet.ramey@case.edu> wrote:

>Gerard wrote:
>> I just installed Bash-4 via the FreeBSD ports system. The
>> installation went fine. However, all of my Bash scripts that use the
>> $(<command>) syntax now fail with this error message:
>> 
>> syntax error near unexpected ')'
>
>This isn't useful at all without an example I can use to reproduce the
>problem.
>
>Have you applied the bash-4.0 patches?  Several deal with command
>substitution parsing.
>
>Chet

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.

This is the output of bash --version

GNU bash, version 4.0.10(1)-release (i386-portbld-freebsd6.3)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

If I can supply anything else, please let me know.

-- 
Gerard
gerard@seibercom.net

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]