Question : ksh "." exports positional parameters and bash doesnt

For Linux RH ES4:

    [linuxserver bin] cat t.sh
    #
    echo "\$#=$#"
    echo "\$0=$0"
    echo "\$1=$1"
    [linuxserver bin] echo $1

    [linuxserver bin] echo $0 $-
    -bash himBH
    [linuxserver bin] . ./t.sh bob
    $#=1
    $0=-bash
    $1=bob
    [linuxserver bin] echo $1

    [linuxserver bin]

for AIX5.3:

    aixserver(/home/user/bin)$ cat t.sh
    #
    echo "\$#=$#"
    echo "\$0=$0"
    echo "\$1=$1"
    aixserver(/home/user/bin)$ echo $1

    aixserver(/home/user/bin)$ echo $0 $-
    -ksh ism
    aixserver(/home/user/bin)$ . ./t.sh bob
    $#=1
    $0=-ksh
    $1=bob
    aixserver(/home/user/bin)$ echo $1
    bob
    aixserver(/home/user/bin)$

Is this a bug or a feature of ksh? Is this not dangerous? Subsequent tests of $1 always find it.

Answer : ksh "." exports positional parameters and bash doesnt

This seems to be an undefined feature in ksh with sourced files; A similar issue was discussed in
http://www.experts-exchange.com/Programming/Programming_Platforms/Unix_Programming/Q_21356040.html

It would be interesting to see what ksh (pdksh?) under RH Linux does
Random Solutions  
 
programming4us programming4us