分页: 1 / 1

求助:大家帮我看看吧!

发表于 : 2009-09-26 21:10
wsad
root@ubuntu:~# source /etc/profile
-bash: [-d:找不到命令
root@ubuntu:~# source /etc/profile
-bash: [-d:找不到命令
为什么找不到命令啊?谢谢了 !

Re: 求助:大家帮我看看吧!

发表于 : 2009-09-26 21:45
xzap
改下/etc/profile里面[-d 这里[后面需要空格
[就是test 命令,后面没有空格就不认识了

Re: 求助:大家帮我看看吧!

发表于 : 2009-09-26 21:58
wsad
if [ -d /etc/profile.d ]; then
for i in /etc/profile.d/*.sh; do
我的这个地方有空格

Re: 求助:大家帮我看看吧!

发表于 : 2009-11-08 21:33
tusooa

代码: 全选

grep [-d /etc/profile && echo 'Error' 1>&2 || echo 'OK' 2>&1

Re: 求助:大家帮我看看吧!

发表于 : 2009-11-13 12:40
wajxh
这个错误也经常看到,没影响使用。就没仔细查过原因