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)
System: NetBSD 7.99.26 NetBSD 7.99.26 (VBOX64-1.1-20160128) #43: Thu Jan 28 16:09:08 ICT 2016 amd64
Architecture: x86_64
Machine: amd64
	The correct way to parse $10 is as ${1}0 but /bin/sh parses
	it the same as ${10}.  Other shells do not.

	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'

	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