NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
bin/48489: sh(1) allows trailing && and ||
>Number: 48489
>Category: bin
>Synopsis: sh(1) allows trailing && and ||
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Jan 02 04:25:00 +0000 2014
>Originator: David A. Holland
>Release: NetBSD 6.99.28 (20131210)
>Organization:
>Environment:
System: NetBSD valkyrie 6.99.28 NetBSD 6.99.28 (VALKYRIE) #14: Tue Dec 10
15:15:49 EST 2013 dholland@valkyrie:/usr/src/sys/arch/amd64/compile/VALKYRIE
amd64
Architecture: x86_64
Machine: amd64
>Description:
sh accepts trailing && or ||, which ought to be a syntax error.
>How-To-Repeat:
sh -c 'true &&'
sh -c 'true ||'
Both ksh and bash report a syntax error. For that matter, so do csh
and tcsh.
zsh does not, but zsh can't really be taken as an authoritative
reference.
>Fix:
dunno, the sh parser is an eldritch horror
Home |
Main Index |
Thread Index |
Old Index