Hi,

The attached testscript has a leading double byte space separator before
the for loop closing "done" keyword. This fails with a syntax error while
parsing.

Is it a bug or is it expected behaviour?

I've tried it with ksh93u+  and ksh93v- versions on a Solaris setup.
bash and zsh also fails, hence I'm thinking it might not be a bug, but
could someone please confirm this.

Here's a sample output.

root@S11_3_SRU:~# echo $LANG
ja_JP.UTF-8
root@S11_3_SRU:~# cat space.ksh
#!/bin/ksh
for i in 1 2
do
echo $i
done   # leading  double byte space character
root@S11_3_SRU:~# od -xc space.ksh
0000000    2321    2f62    696e    2f6b    7368    0a66    6f72    2069
           #   !   /   b   i   n   /   k   s   h  \n   f   o   r       i
0000020    2069    6e20    3120    320a    646f    0a65    6368    6f20
               i   n       1       2  \n   d   o  \n   e   c   h   o
0000040    2469    0ae3    8080    646f    6e65    0a00
           $   i  \n 343 200 200   d   o   n   e  \n
0000053
root@S11_3_SRU:~# ksh --version
  version         sh (AT&T Research) 93u+ 2012-08-01
root@S11_3_SRU:~# ksh space.ksh
space.ksh: syntax error at line 6: `for' unmatched
root@S11_3_SRU:~# ./ksh-2014
root@S11_3_SRU:~# echo ${.sh.version}
Version AIJMP 93v- 2014-12-24
root@S11_3_SRU:~# ./space.ksh
./space.ksh: syntax error at line 6: `for' unmatched
root@S11_3_SRU:~#

Thanks,
Lijo

Attachment: space.ksh
Description: Binary data

_______________________________________________
ast-developers mailing list
[email protected]
http://lists.research.att.com/mailman/listinfo/ast-developers

Reply via email to