From owner-freebsd-questions@FreeBSD.ORG Thu Mar 12 14:25:34 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 26151106564A for ; Thu, 12 Mar 2009 14:25:34 +0000 (UTC) (envelope-from gesbbb@yahoo.com) Received: from smtp103.prem.mail.ac4.yahoo.com (smtp103.prem.mail.ac4.yahoo.com [76.13.13.42]) by mx1.freebsd.org (Postfix) with SMTP id B306C8FC12 for ; Thu, 12 Mar 2009 14:25:33 +0000 (UTC) (envelope-from gesbbb@yahoo.com) Received: (qmail 26308 invoked from network); 12 Mar 2009 14:25:33 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Received:X-YMail-OSG:X-Yahoo-Newman-Property:Date:From:To:Subject:Message-ID:Reply-To:Organization:X-Mailer:Face:X-Face:Mime-Version:Content-Type; b=T3xxzPlq6KZdMwwuHAqVo1yP+4Aew5AlCLONUgUQYEU4NEHzx4W0Akcw0k4+qGY+/A3Ic+04HTUz8jwdc/d1THwOCEE9ihYl0wx35BvWMCLB+aAIazTzL5LFYkLGRGWkx/FtgtOCmdGTCX97PQhtJbTXrpd66lHqV9OAx5PGnJU= ; Received: from unknown (HELO scorpio) (gesbbb@76.23.177.172 with login) by smtp103.prem.mail.ac4.yahoo.com with SMTP; 12 Mar 2009 14:25:32 -0000 X-YMail-OSG: W6GRQOoVM1m6nOH.Fs6bqwL87mLqW5737MBCwvMtw0nyZbr2qfU8oe4ZQP2_NbvTRjQJAy7aTy_qWZ1BEG6YrYoZc4U3A0KCNNxRs.cvxRhNXkcKWcPSYt6TFaVz4oGfxBWE4QtzK2VJzZyyrWb_4kjgxzluz5jRzmG0t6wugXqOaSCeYLPeo2WBSTd0chW1HBJi9e3a48WdDDsT8HVcRVmdERz5 X-Yahoo-Newman-Property: ymail-3 Date: Thu, 12 Mar 2009 10:25:23 -0400 From: Jerry To: freebsd-questions@freebsd.org Message-ID: <20090312102523.6f5ad248@scorpio> Organization: seibercom.net X-Mailer: Claws Mail 3.7.1 (GTK+ 2.14.7; i386-portbld-freebsd6.3) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEX+/v7++v6YOTrq8PCcuIX989UvOSj++v0BNCbpAAAAB3RJTUUHsQwfFzs7RBhzUQAAAhJJREFUOI1dU8GOqzAMNKIoV1bvwD1i0ysqrHplIdBrVSX7ATSbd03VVvn9tQNtQy0hjAdn7LED4AAcPtWm9RV+MPSfxhBLx9ajd6X/ngB6/mTwnRSZua7i7Ca+0ctZKo4Qmz+JY13X6I3nFZBxIYW1PbgfQ5RP8g0XlltEWGf3cV03joYpRnFbvYDKbXjZlXyyhEZA4lI+cN3NaVXE4VKjSwTExO10eTEkkJVqIAD5z0nUBQJluQDRSQjcrBiHAJxZlAH5CUMBMC7OcJ4LMQNnxhZ1HYPscMc6J4UlWRMNwzOpCcAHKSICd1EDn83abdREIbXsHkD1OinP1aCUCOEVRaa1lMcvywUWdYgk13JQUpYNKmvXQ8Kw5ML9YI5h8SakctBc7E/IYuLhYd/zZIk+1gM1vNweQBvHE0j+oYah3sMqAytQYlZk6+ANaaawJdu3OFzYGMZ3iGpa3qMlq9ZH0VZTgrCtw/ngdYkEIIpSbP1bWQAdFdX9vocBdkH2qVjVmuMu3gI5rjs814EUdrCZgWlPaxZZ3RiLFUtr+ud0PXwp2dnQSNXgePt6AZpBj6UMJ7VQkzN4utVeaSW1Dhn/kblGrKeMvNGnzwX4zuEDarYz1KdPtR60Gul0Gued+515SJXhCsl+Tx/3kY/UDvicPll9mfu50t3tvQ/thZpJYgeuwdSKNJ6tCD98MCgoxLDaPxbwqqwPWaWiAAAAAElFTkSuQmCC X-Face: "\j?x](l|]4p?-1Bf@!wN<&p=$.}^k-HgL}cJKbQZ3r#Ar]\%U(#6}'?<3s7%(%(gxJxxcR nSNPNr*/^~StawWU9KDJ-CT0k$f#@t2^K&BS_f|?ZV/.7Q Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/CWETOEq.heNAgahB2DxxYLS"; protocol="application/pgp-signature"; micalg=PGP-SHA1 Subject: Problem with Bash-4 and $(command) syntax X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-questions@freebsd.org List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Mar 2009 14:25:34 -0000 --Sig_/CWETOEq.heNAgahB2DxxYLS Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 GET_PATH=3D1 if $( which gpg2 ); then printf "gpg2 located" fi =20 =20 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. --=20 Jerry gesbbb@yahoo.com --Sig_/CWETOEq.heNAgahB2DxxYLS Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (FreeBSD) iEYEARECAAYFAkm5G1sACgkQBvaKIJWWCO2DLwCeIWK5Hn1gnHliPHajtmPBOeUG Dj4An1725D+MLKmmXbX2V4LZll/j5Ne3 =6uLu -----END PGP SIGNATURE----- --Sig_/CWETOEq.heNAgahB2DxxYLS--