Your message dated Fri, 04 Dec 2015 09:35:03 +0000
with message-id <[email protected]>
and subject line Re: Bug#807011: ksh: Conditional variable expansion problem in 
while loop
has caused the Debian Bug report #807011,
regarding ksh: Conditional variable expansion problem in while loop
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
807011: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=807011
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: ksh
Version: 93u+20120801-2
Severity: important

$ for s in '' ba da k mk z; do
  sh=${s}sh
  echo -n $sh:
  seq 4 |${s}sh -c 'unset v; while read n; do [ -n "${v+set}" ] && echo -n "$v 
"; v="$n"; done; echo "$v"'
done
sh:1 2 3 4
bash:1 2 3 4
dash:1 2 3 4
ksh:4
mksh:1 2 3 4
zsh:1 2 3 4

`[ -n "${v+set}" ] ` must be true on 2nd iteration and later in all *sh,
but only ksh returns the false on all iteration.

-- 
-- Name: SATOH Fumiyasu @ OSS Technology Corp. (fumiyas @ osstech co jp)
-- Business Home: http://www.OSSTech.co.jp/
-- GitHub Home: https://GitHub.com/fumiyas/
-- PGP Fingerprint: BBE1 A1C9 525A 292E 6729  CDEC ADC2 9DCA 5E1C CBCA

--- End Message ---
--- Begin Message ---
Satoh,
The problem seems to be that you are using "${v+set}" rather than "${v}set" .

On 04/12/15 06:22, SATOH Fumiyasu wrote:
Package: ksh
Version: 93u+20120801-2
Severity: important

$ for s in '' ba da k mk z; do
   sh=${s}sh
   echo -n $sh:
   seq 4 |${s}sh -c 'unset v; while read n; do [ -n "${v+set}" ] && echo -n "$v "; 
v="$n"; done; echo "$v"'
done
sh:1 2 3 4
bash:1 2 3 4
dash:1 2 3 4
ksh:4
mksh:1 2 3 4
zsh:1 2 3 4

`[ -n "${v+set}" ] ` must be true on 2nd iteration and later in all *sh,
but only ksh returns the false on all iteration.

--- End Message ---

Reply via email to