Bug#807011: ksh: Conditional variable expansion problem in while loop

2016-02-09 Thread SATOH Fumiyasu
Hi, On Sat, 05 Dec 2015 08:03:32 +0900, Nicholas Bamber wrote: > It is not releveant how this works in other shells (or even other > versions of ksh). All that matters is whether this syntax is defined by the > POSIX standard. It's not even documented as a bash feature let alone a POSIX

Bug#807011: ksh: Conditional variable expansion problem in while loop

2015-12-04 Thread SATOH Fumiyasu
Hi, > The problem seems to be that you are using "${v+set}" rather than > "${v}set" . No. Do you understand what does "${v+set}" mean? Please reopen this bug. I want use this trick to avoid additional first blank line in the following script with ksh:

Bug#807011: ksh: Conditional variable expansion problem in while loop

2015-12-04 Thread Nicholas Bamber
Satoh, It is not releveant how this works in other shells (or even other versions of ksh). All that matters is whether this syntax is defined by the POSIX standard. It's not even documented as a bash feature let alone a POSIX standard. It may be of interest to you to be reminded

Bug#807011: ksh: Conditional variable expansion problem in while loop

2015-12-03 Thread SATOH Fumiyasu
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