From owner-freebsd-standards@FreeBSD.ORG Mon Aug 12 21:10:03 2013 Return-Path: Delivered-To: freebsd-standards@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 02CF4F9D for ; Mon, 12 Aug 2013 21:10:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E1DE32BD6 for ; Mon, 12 Aug 2013 21:10:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r7CLA1LV005925 for ; Mon, 12 Aug 2013 21:10:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r7CLA1lH005924; Mon, 12 Aug 2013 21:10:01 GMT (envelope-from gnats) Date: Mon, 12 Aug 2013 21:10:01 GMT Message-Id: <201308122110.r7CLA1lH005924@freefall.freebsd.org> To: freebsd-standards@FreeBSD.org Cc: From: Jens Schweikhardt Subject: Re: standards/181240: /bin/sh choking on a certain construct X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Jens Schweikhardt List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Aug 2013 21:10:03 -0000 The following reply was made to PR standards/181240; it has been noted by GNATS. From: Jens Schweikhardt To: Tamas TEVESZ Cc: freebsd-gnats-submit@FreeBSD.org Subject: Re: standards/181240: /bin/sh choking on a certain construct Date: Mon, 12 Aug 2013 23:06:43 +0200 On Mon, Aug 12, 2013 at 01:54:02PM +0000, Tamas TEVESZ wrote: # >How-To-Repeat: # /bin/sh -c 'echo foo || >&2 | cat' # # (Or, if you have misc/mc installed, hit ^[3 on a .diff/.patch/.so etc. file for which mc calls /usr/local/libexec/mc/ext.d/misc.sh) A simpler invocation is $ >x | cat Syntax error: "|" unexpected If I read the SUS shell grammar correctly, a lone redirection cannot be a simple command in a pipe, so this is an extension that the other shells accept. I'm not sure if this is a particular useful extension. Regards, Jens -- Jens Schweikhardt http://www.schweikhardt.net/ SIGSIG -- signature too long (core dumped)