From owner-freebsd-ports@FreeBSD.ORG Thu Mar 12 14:48:46 2009 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3D5B91065674 for ; Thu, 12 Mar 2009 14:48:46 +0000 (UTC) (envelope-from andrew.w.nosenko@gmail.com) Received: from mail-fx0-f158.google.com (mail-fx0-f158.google.com [209.85.220.158]) by mx1.freebsd.org (Postfix) with ESMTP id 951D98FC20 for ; Thu, 12 Mar 2009 14:48:45 +0000 (UTC) (envelope-from andrew.w.nosenko@gmail.com) Received: by fxm2 with SMTP id 2so405986fxm.43 for ; Thu, 12 Mar 2009 07:48:44 -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 :content-transfer-encoding; bh=h6rpUb0MlYlDHOAUS4aqsklWnlmAueR3L0RiaSDupkU=; b=Yabx8hXVlqTIbsqGTDJ16zHNl/ylTdJCpzGgG+Zu1Z4L2HQayz2pwsBC0oPd7djJOh ukyEBy+1NMNY7ruf0zo+kNwpdVGtyXnC5V4T57gx8LrAnGImcKd7sHd3ts2I0a7KH7Rw gkGvz9pUeX5Qv8ro3Mm69c3XhwTNXAXrU/wk0= 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:content-transfer-encoding; b=f7S1rU3T0YJizx9E6mg5e6TBVzG9wP7GT2Rzr7DEQN7B28DKmTbS4kqLzDJdlUt6zl ri+Fq4AWtQpsnL6GZB9TGa3ewVKHCBXGj2b5hxVxrGMg/K9Y6c5ZTroGx+HYqS0Yg626 31bNDHewykR0AXp9hjYehVuZopq8fNOIUPNiQ= MIME-Version: 1.0 Received: by 10.204.116.15 with SMTP id k15mr12549bkq.111.1236869324569; Thu, 12 Mar 2009 07:48:44 -0700 (PDT) In-Reply-To: <20090312143710.GA106@mud.stack.nl> References: <20090311210322.GA17971@ozzmosis.com> <20090312073556.GA39778@ozzmosis.com> <20090312112958.4d0cac92.ehaupt@FreeBSD.org> <76B7C6A4-B380-4224-AF69-03ABB1CE5175@lassitu.de> <20090312103015.2ee5dbef@scorpio> <20090312143710.GA106@mud.stack.nl> Date: Thu, 12 Mar 2009 16:48:44 +0200 Message-ID: <6161f3180903120748h5a9b6b17y2faf779b69819c7@mail.gmail.com> From: "Andrew W. Nosenko" To: Johan van Selst Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-ports@freebsd.org Subject: Re: shells/bash-4.0 port horribly broken X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Mar 2009 14:48:46 -0000 On Thu, Mar 12, 2009 at 4:37 PM, Johan van Selst wrote: > Jerry wrote: >> Was this some sort of 'improvement' by the Bash developers, or is it >> an un-squashed bug? > > It seems that this might actually be a feature. > Quoting the COMPAT document of bash4: > > 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. Sorry, but I didn't see how it can be applied. In another words, how the 'ls' command in the $ echo $(ls) contradicts with POSIX. http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_06_03 With the $( command) form, all characters following the open parenthesis to the matching closing parenthesis constitute the command. Any valid shell script can be used for command, except a script consisting solely of redirections which produces unspecified results. Sure, 'ls' is not a something that "consisting solely of redirections". -- Andrew W. Nosenko