I just updated from Bash-3.x to Bash-4.0. There appears to be a problem
with the way Bash-4 interprits the following.

This works fine on Bash-3.x:
#!/usr/bin/env bash


if $( which gpg2 ); then
   printf "gpg2 located"
However, under Bash-4, it fail with this error message:

./t.sh: command substitution: line 6: syntax error near unexpected
token `)' ./t.sh: command substitution: line 6: ` which gpg2 )'

I have several scripts that use the $(command) syntax and they are all
failing now. I have replaced that syntax with the older "`" tics method.

Is this a known problem with Bash-4? I have not been able to find
anything about it on the Bash site.


Attachment: signature.asc
Description: PGP signature

Reply via email to