请问各位高手们是什么原因阿?
我的程序是:
#!/bin/bash
#This program is used to "declare" variables
#user 2009/11/26
number1=2*3+5*13-32+25
#declare -i
number2=2*3+5*13-32+25
echo "Your result is ==> $number1"
echo "Your resutl is ==> $number2"
输出结果应该是:
Your result is ==> 2*3+5*13-32+25
Your resutl is ==> 64
而我的输出是:
user@user-desktop:~/test$ sh test03-declare.sh
test03-declare.sh: 5: declare: not found
Your result is ==> 2*3+5*13-32+25
Your resutl is ==>
运行shell时,提示declare: not found
-
- 帖子: 11
- 注册时间: 2009-10-29 14:13
- 联系:
-
- 帖子: 6
- 注册时间: 2009-11-16 14:39
Re: 运行shell时,提示declare: not found
sudo dpkg-reconfigure dash选否
-
- 帖子: 3
- 注册时间: 2010-04-18 10:59
- 见特但
- 帖子: 105
- 注册时间: 2009-10-11 14:43
Re: 运行shell时,提示declare: not found
sudo dpkg-reconfigure dash不管用呦
貌似不能的……
貌似不能的……
-
- 帖子: 1
- 注册时间: 2011-03-02 19:58
Re: 运行shell时,提示declare: not found
谢谢3楼!~我的也可以了!~哈哈哈!~楼主也是在看鸟哥把!~这个是鸟哥的例题
-
- 帖子: 1
- 注册时间: 2011-03-30 16:00
Re: 运行shell时,提示declare: not found
感谢3楼,我也在看鸟哥