LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 653|回复: 1

source的问题~

[复制链接]
发表于 2005-12-23 13:08:24 | 显示全部楼层 |阅读模式
goon=true


while [ $goon=true ]
do
        let num=1;
       
        echo "$DIR_STACK"       
        for direc in $DIR_STACK
        do
                echo "$num) $direc"
                let num+=1
        done
       
        echo "lease enter your selection:"       
        read choice
        getdir $choice
       
        if [ $choice -lt $num ] && [ $choice -ge 1 ]
        then
                DIR_STACK="$stackfront $DIR_STACK"
                cd $target
                echo $target
                break
        else
                echo "invalid choice!"       
        fi
        echo "ress any key to continue..."
       
done

这个是我写的仿selectd的脚本,取名为fakeselectd,
使用source fakeselectd可以正常运行,而在source fakeselectd之后
用./fakeselectd却看不到direc的输出,请问是什么原因阿?
 楼主| 发表于 2005-12-23 21:04:05 | 显示全部楼层
急求阿~~~有人能指教一下吗?
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表