Bug 181240

Summary: /bin/sh choking on a certain construct
Product: Base System Reporter: ice
Component: standardsAssignee: Jilles Tjoelker <jilles>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   

Description ice 2013-08-12 15:00:00 UTC
$ /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.
Comment 1 Jilles Tjoelker freebsd_committer freebsd_triage 2014-08-31 21:07:19 UTC
This was fixed in 10-current by SVN r254335 and in 9-stable by SVN r255065. Backporting to 8-stable needs a slight adjustment and is probably not worth it unless someone has a concrete problem.