From owner-freebsd-questions@FreeBSD.ORG Fri Mar 13 04:41:47 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 1FD63106564A for ; Fri, 13 Mar 2009 04:41:47 +0000 (UTC) (envelope-from eray.aslan@caf.com.tr) Received: from mail.caf.com.tr (mail.caf.com.tr [88.250.85.68]) by mx1.freebsd.org (Postfix) with ESMTP id B740D8FC0C for ; Fri, 13 Mar 2009 04:41:46 +0000 (UTC) (envelope-from eray.aslan@caf.com.tr) Received: from localhost (sunny.caf.com.tr [127.0.0.1]) by mail.caf.com.tr (Postfix) with ESMTP id 8034E39E36F for ; Fri, 13 Mar 2009 04:24:15 +0000 (UTC) X-Virus-Scanned: amavisd-new at caf.com.tr Received: from mail.caf.com.tr ([127.0.0.1]) by localhost (sunny.caf.com.tr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RHiADs+TGbqK for ; Fri, 13 Mar 2009 04:24:13 +0000 (UTC) Received: from [10.22.138.199] (unknown [213.87.81.69]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: eray.aslan@zeplin.net) by mail.caf.com.tr (Postfix) with ESMTPSA id 08F5A39E36D for ; Fri, 13 Mar 2009 04:24:11 +0000 (UTC) Message-ID: <49B9DFE3.9000409@caf.com.tr> Date: Fri, 13 Mar 2009 06:24:03 +0200 From: Eray Aslan User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.19) Gecko/20081209 Thunderbird/2.0.0.19 Mnenhy/0.7.6.0 MIME-Version: 1.0 To: freebsd-questions@freebsd.org References: <20090312102523.6f5ad248@scorpio> <49B9409A.29090.10C8FB5@markmcconnell.iinet.com> In-Reply-To: <49B9409A.29090.10C8FB5@markmcconnell.iinet.com> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: Problem with Bash-4 and $(command) syntax X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Mar 2009 04:41:47 -0000 On 13.03.2009 02:04, Mark McConnell wrote: > On 12 Mar 2009 at 10:25, Jerry wrote: > {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 > Like you, I wasn't able to find discussion of this on > the lists I subscribe to - although I'm sure it's going > on. Looking through the diffs in > /usr/ports/distfiles/bash, the bracketed form of > command substitution appears to be a long- > standing problem in bash40-xxx. > > The back-tick `command` form works as it should, > but not the Posix-style $(command) form, as of > GNU bash, version 4.0.10(1)-release > > Mark > --