Chinaunix
标题:
shell问题
[打印本页]
作者:
zyj19871215
时间:
2012-06-20 16:58
标题:
shell问题
1 #!/bin/bash
2
3 MAX=10000
4
5
6 for((nr=1; nr<$MAX; nr++))
7 do
8
9 let "t1 = nr % 5"
10 if [ "$t1" -ne 3 ]
11 then
12 continue
13 fi
14
15 let "t2 = nr % 7"
16 if [ "$t2" -ne 4 ]
17 then
18 continue
19 fi
20
21 let "t3 = nr % 9"
22 if [ "$t3" -ne 5 ]
23 then
24 continue
25 fi
26
27 break # What happens when you comment out this line? Why?
28
29 done
30
31 echo "Number = $nr"
32
33
34 exit 0
求详解,没搞明白啊
作者:
Shell_HAT
时间:
2012-06-20 18:59
如果某一行不明白,请指出来。
如果全部不明白,看书吧,骚年。
欢迎光临 Chinaunix (http://bbs.chinaunix.net/)
Powered by Discuz! X3.2