分页: 1 / 1

居然说 echo: command not found

发表于 : 2008-09-30 21:33
cyl-seaside
#!/bin/bash
if [ "$SHELL" = "/bin/bash" ]; then
 echo "your login shell is the bash (bourne again shell)"
else
 echo "your login shell is not bash but $SHELL"
fi
我在运行上面个脚本的时候,居然说这样說
怎么回事呐

Re: 居然说 echo: command not found

发表于 : 2008-09-30 22:00
sinyadvan
:em20
把echo前的全角空格删了

Re: 居然说 echo: command not found

发表于 : 2008-10-01 10:25
cyl-seaside
不行啊
#!/bin/bash
if [ "$SHELL" = "/bin/bash" ]; then
 echo"your login shell is the bash (bourne again shell)"
else
 echo"your login shell is not bash but $SHELL"
fi
./b: line 3:  echoyour login shell is the bash (bourne again shell): command not found
cyl@ubuntu:~/Desktop$

Re: 居然说 echo: command not found

发表于 : 2008-10-01 10:43
hubert_star
恩,看到楼主的改写后的脚本我觉得还是去河边看别人钓鱼吧。。。

Re: 居然说 echo: command not found

发表于 : 2008-10-01 10:43
Cracky.Dream
echoyour login
echo后面要加空格的吧
echo"test"报错,
echo "test"没错

Re: 居然说 echo: command not found

发表于 : 2008-10-01 10:49
cyl-seaside
#!/bin/bash
echo "hello"
呵呵,这个就行

Re: 居然说 echo: command not found

发表于 : 2008-10-01 10:54
cyl-seaside
额,是这样的啊 :em06
#!/bin/bash
if [ "$SHELL" = "/bin/bash" ]; then
echo "your login shell is the bash (bourne again shell)"
else
echo "your login shell is not bash but $SHELL"
fi

Re: 居然说 echo: command not found

发表于 : 2008-10-01 11:05
BigSnake.NET
cyl-seaside 写了:不行啊
#!/bin/bash
if [ "$SHELL" = "/bin/bash" ]; then
 echo"your login shell is the bash (bourne again shell)"
else
 echo"your login shell is not bash but $SHELL"
fi
./b: line 3:  echoyour login shell is the bash (bourne again shell): command not found
cyl@ubuntu:~/Desktop$
人家是说前...

Re: 居然说 echo: command not found

发表于 : 2008-10-01 14:16
bones7456
:em04

Re: 居然说 echo: command not found

发表于 : 2008-10-01 14:18
solcomo
好大一个空格

Re: 居然说 echo: command not found

发表于 : 2008-10-02 3:28
cyl-seaside
前后有歧义 :em09