分页: 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
把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
额,是这样的啊
#!/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
Re: 居然说 echo: command not found
发表于 : 2008-10-01 14:18
由 solcomo
好大一个空格
Re: 居然说 echo: command not found
发表于 : 2008-10-02 3:28
由 cyl-seaside
前后有歧义
