standards/181240: /bin/sh choking on a certain construct
Tamas TEVESZ
ice at extreme.hu
Mon Aug 12 14:00:01 UTC 2013
>Number: 181240
>Category: standards
>Synopsis: /bin/sh choking on a certain construct
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-standards
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Mon Aug 12 14:00:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator: Tamas TEVESZ
>Release: 9.1
>Organization:
>Environment:
FreeBSD localhost.localdomain 9.1-RELEASE-p5 FreeBSD 9.1-RELEASE-p5 #13 r253984: Wed Aug 7 03:49:56 CEST 2013 root at localhost.localdomain:/usr/obj/usr/src/sys/DTRACE amd64
>Description:
$ /bin/sh -c 'echo foo || >&2 | cat'
Syntax error: "|" unexpected
This snippet is run finely by every Bourne-ish shell I could manage to check (pdksh, busybox ash, dash, Solaris' /usr/xpg4/bin/sh, HPUX's sh, even ports/v7sh). Because of this, I'm categorizing this as a standards bug (even though I haven't checked POSIX or SuS), feel free to re-categorize.
>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)
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-standards
mailing list