Following is a bug reported to the Debian bug tracking system.

------- Forwarded Message

Date:    Thu, 04 Aug 2011 18:42:18 +0900
From:    SATOH Fumiyasu <[email protected]>
To:      [email protected]
Subject: Bug#636580: ksh: ${-#pattern} fails in set -u mode

Package: ksh
Version: 93u-1
Severity: important

ksh treats ${-#pattern} (and others) as an error with set -u mode.
$- is always set by ksh, thus ${-#pattern} must NOT fails
whether set -u or not.

$ /bin/ksh --version
  version         sh (AT&T Research) 93u 2011-02-08

$ /bin/ksh -c 'set -u; echo $-; echo ${-#dummy}'
chsuB
/bin/ksh: line 1: -: parameter not set

$ /bin/ksh -c 'set -u; echo $-; echo ${-##dummy}'
chsuB
/bin/ksh: line 1: -: parameter not set

$ /bin/ksh -c 'set -u; echo $-; echo ${-%dummy}'
chsuB
/bin/ksh: line 1: -: parameter not set

$ /bin/ksh -c 'set -u; echo $-; echo ${-%%dummy}'
chsuB
/bin/ksh: line 1: -: parameter not set

$ /bin/ksh -c 'set -u; echo $-; echo ${-/dummy1/dummy2}'
chsuB
/bin/ksh: line 1: -: parameter not set

- -- 
- -- Name: SATOH Fumiyasu (fumiyas @ osstech co jp)
- -- Business Home: http://www.OSSTech.co.jp/
- -- Personal Home: http://www.SFO.jp/blog/

------- End of Forwarded Message
_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users

Reply via email to