NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bin/51027: /bin/sh misparses $10 (etc)



>Number:         51027
>Category:       bin
>Synopsis:       /bin/sh misparses $10 (etc)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Mar 30 12:05:00 +0000 2016
>Originator:     Robert Elz
>Release:        NetBSD 7.99.26 (all to current as of date of this PR)
>Organization:
>Environment:
(irrelevant)
	
	
System: NetBSD andromeda.noi.kre.to 7.99.26 NetBSD 7.99.26 (VBOX64-1.1-20160128) #43: Thu Jan 28 16:09:08 ICT 2016 kre%onyx.coe.psu.ac.th@localhost:/usr/obj/current/kernels/amd64/VBOX64 amd64
Architecture: x86_64
Machine: amd64
>Description:
	The correct way to parse $10 is as ${1}0 but /bin/sh parses
	it the same as ${10}.  Other shells do not.

>How-To-Repeat:
	sh -c ' set -- a b c d e f g h i j k l m n o p
		echo ${1}0 ${10} $10 ... should be a0 j a0'

>Fix:
	This can be considered a placeholder PR, this bug is fixed
	in my sources already.   Fix coming to CVS soon.



Home | Main Index | Thread Index | Old Index