
关于SHELL编程的一个错误,请高手帮看下 10
#!/bin/bashdeclarecoun=0while["$coun"-lt10]dolet$coun="$coun+1"done[root@localhostfug...
#!/bin/bash
declare coun = 0
while [ "$coun" -lt 10 ]
do
let $coun = "$coun + 1"
done
[root@localhost fugd]# ./j.sh
./j.sh: line 2: declare: `=': not a valid identifier
./j.sh: line 2: declare: `0': not a valid identifier
./j.sh: line 3: [: : integer expression expected
请高手帮看一下 这个错误是怎么回事???
按照mythmy2008改了 还是不对啊~ 展开
declare coun = 0
while [ "$coun" -lt 10 ]
do
let $coun = "$coun + 1"
done
[root@localhost fugd]# ./j.sh
./j.sh: line 2: declare: `=': not a valid identifier
./j.sh: line 2: declare: `0': not a valid identifier
./j.sh: line 3: [: : integer expression expected
请高手帮看一下 这个错误是怎么回事???
按照mythmy2008改了 还是不对啊~ 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询