【发布时间】:2015-05-16 22:59:29
【问题描述】:
我在init.sh 中有这个shell 脚本
echo "hello";
export ANDROID_HOME=/home/sadaf2605/adt-bundle-linux-x86-20140702/sdk;
export PATH=${PATH}:/home/sadaf2605/adt-bundle-linux-x86-20140702/sdk/tools;
export PATH=${PATH}:/home/sadaf2605/adt-bundle-linux-x86-20140702/sdk/platform-tools
echo "end"
echo $PATH
并打印了这个:
sadaf2605@sadaf-pc:~/Estimator-cordova$ ./init.sh
hello
end
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/sadaf2605/adt-bundle-linux-x86-20140702/sdk/tools:/home/sadaf2605/adt-bundle-linux-x86-20140702/sdk/platform-tools
看起来不错,我知道,但是当我回显 $Path 时,我什么也没得到:
sadaf2605@sadaf-pc:~/Estimator-cordova$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
sadaf2605@sadaf-pc:~/Estimator-cordova$
为什么它不起作用,我怎样才能使它起作用?
【问题讨论】: