NetBSD-Bugs archive

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

bin/39139: sh doesn't handle quoting in ${foo#bar} correctly



>Number:         39139
>Category:       bin
>Synopsis:       sh doesn't handle quoting in ${foo#bar} correctly
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jul 12 21:50:00 +0000 2008
>Originator:     Seebs
>Release:        NetBSD 3.0.1
>Organization:
>Environment:
System: NetBSD guild.seebs.net 3.0.1 NetBSD 3.0.1 (GUILD) #0: Thu Sep 21 
18:11:24 CDT 2006 root@:/usr/src/sys/arch/i386/compile/GUILD i386
Architecture: i386
Machine: i386
>Description:
        In ${foo#bar} expansions, bar is treated as a pattern -- but is
        subject to quoting, which removes the special meanings of pattern
        metacharacters.
>How-To-Repeat:
        a=b
        echo ${a#?} => ''
        echo ${a#\?} => '', should be 'b'.
>Fix:
        None obvious.  pdksh/ksh93/bash do this right.



Home | Main Index | Thread Index | Old Index