Date: Mon, 12 Aug 2013 21:10:01 GMT From: Jens Schweikhardt <schweikh@schweikhardt.net> To: freebsd-standards@FreeBSD.org Subject: Re: standards/181240: /bin/sh choking on a certain construct Message-ID: <201308122110.r7CLA1lH005924@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR standards/181240; it has been noted by GNATS. From: Jens Schweikhardt <schweikh@schweikhardt.net> To: Tamas TEVESZ <ice@extreme.hu> 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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201308122110.r7CLA1lH005924>