From owner-freebsd-questions@FreeBSD.ORG Fri Mar 13 19:16:09 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 009EC106566C for ; Fri, 13 Mar 2009 19:16:08 +0000 (UTC) (envelope-from tajudd@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.251]) by mx1.freebsd.org (Postfix) with ESMTP id ADE718FC1E for ; Fri, 13 Mar 2009 19:16:08 +0000 (UTC) (envelope-from tajudd@gmail.com) Received: by an-out-0708.google.com with SMTP id b38so1124504ana.13 for ; Fri, 13 Mar 2009 12:16:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=ixxPD5w0T3ocgMyYiypsTAYkyCnsuewDSJcE97nwV7U=; b=UYbzPcSi5uD3Q3IE95va7l1PqcLfUeQbFNST+MwO9s85Zwrp8BUtIaX8qoCo+PYrbq ailgNdyJdziWlFquoAqNqc6f+ALGkT2rqBh4LBXWaPcIONKv8aRrYTq1b0F6bcUQgQk6 8TR4QrleZWR8b19QnrMVsId2NBlLiNo2XFg6g= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=sz4fAvSrWre3m3kZ57D5EpdaJEHLtTA3Gya1g5LKSyOxM9iBRV+z22q0iSLusOP9JI pIh9nDquw5FNg3iZZs4jYUg34A8NI+v2DMcfimj8OeD/frPE37aDUG8H0eX7KsGVIUO2 CvxjOFh1DpCi9DT3GQwDp3/tcq+Rzgr5c9aAo= MIME-Version: 1.0 Received: by 10.231.19.204 with SMTP id c12mr370344ibb.20.1236971768029; Fri, 13 Mar 2009 12:16:08 -0700 (PDT) In-Reply-To: <721111.30542.qm@web39104.mail.mud.yahoo.com> References: <721111.30542.qm@web39104.mail.mud.yahoo.com> Date: Fri, 13 Mar 2009 13:16:07 -0600 Message-ID: From: Tim Judd To: bf2006a@yahoo.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-questions@freebsd.org 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 19:16:10 -0000 On Thu, Mar 12, 2009 at 11:35 PM, bf 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 > > Yes, the above is true. But many of the examples cited > by people noticing this problem are perfectly valid and > _should_ work. The problem is that the port's parser is > broken, owing in part to incompatibilities between the > system yacc currently used to build the parser and GNU > bison, which is used by the people who write bash. This > is true of both shells/bash and shells/bash3, but is more > noticeable in shells/bash. A fix has been proposed, and patches > are available, in the follow-up to: > > http://www.FreeBSD.org/cgi/query-pr.cgi?pr=ports/101230 > > The port's maintainer has been reluctant to switch to bison, > so this may not be the solution that is ultimately used to > fix the port, but you can use these in the meantime. > > Regards, > b. > > I'm wondering if a fix can be accomplished due to a semicolon within the ()s to complete a command line. Similar to how find(1) expression works, you have to end the expression with a semicolon in order for find to successfully (and willingly) work. Can the OP try if $( which gpg2; ); then And let us know. My $.02