LinuxSir.cn,穿越时空的Linuxsir!

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

source的一点问题

[复制链接]
发表于 2005-12-24 11:31:59 | 显示全部楼层 |阅读模式
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的输出,请问是什么原因阿?

shell版里发了好多贴,只有一个贴有人回复,只好发到这里了~~拜托高手指教一下吧
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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