Last change
on this file since 2182 was 1765, checked in by Bruno Cornec, 17 years ago |
Update to busybox 1.7.2
|
-
Property svn:executable
set to
*
|
File size:
863 bytes
|
Rev | Line | |
---|
[1765] | 1 | fx()
|
---|
| 2 | {
|
---|
| 3 | i=0
|
---|
| 4 | for (( ; i < 3; i++ ))
|
---|
| 5 | do
|
---|
| 6 | echo $i
|
---|
| 7 | done
|
---|
| 8 |
|
---|
| 9 | for (( i=0; ; i++ ))
|
---|
| 10 | do
|
---|
| 11 | if (( i >= 3 )); then
|
---|
| 12 | break;
|
---|
| 13 | fi
|
---|
| 14 | echo $i
|
---|
| 15 | done
|
---|
| 16 |
|
---|
| 17 | for (( i=0; i<3; ))
|
---|
| 18 | do
|
---|
| 19 | echo $i
|
---|
| 20 | (( i++ ))
|
---|
| 21 | done
|
---|
| 22 |
|
---|
| 23 | i=0
|
---|
| 24 | for (( ; ; ))
|
---|
| 25 | do
|
---|
| 26 | if (( i > 2 )); then
|
---|
| 27 | break;
|
---|
| 28 | fi
|
---|
| 29 | echo $i;
|
---|
| 30 | (( i++ ))
|
---|
| 31 | done
|
---|
| 32 |
|
---|
| 33 | i=0
|
---|
| 34 | for ((;;))
|
---|
| 35 | do
|
---|
| 36 | if (( i > 2 )); then
|
---|
| 37 | break;
|
---|
| 38 | fi
|
---|
| 39 | echo $i;
|
---|
| 40 | (( i++ ))
|
---|
| 41 | done
|
---|
| 42 | }
|
---|
| 43 |
|
---|
| 44 | for (( i=0; "i < 3" ; i++ ))
|
---|
| 45 | do
|
---|
| 46 | echo $i
|
---|
| 47 | done
|
---|
| 48 |
|
---|
| 49 | i=0
|
---|
| 50 | for (( ; "i < 3"; i++ ))
|
---|
| 51 | do
|
---|
| 52 | echo $i
|
---|
| 53 | done
|
---|
| 54 |
|
---|
| 55 | for (( i=0; ; i++ ))
|
---|
| 56 | do
|
---|
| 57 | if (( i >= 3 )); then
|
---|
| 58 | break;
|
---|
| 59 | fi
|
---|
| 60 | echo $i
|
---|
| 61 | done
|
---|
| 62 |
|
---|
| 63 | for ((i = 0; ;i++ ))
|
---|
| 64 | do
|
---|
| 65 | echo $i
|
---|
| 66 | if (( i < 3 )); then
|
---|
| 67 | (( i++ ))
|
---|
| 68 | continue;
|
---|
| 69 | fi
|
---|
| 70 | break
|
---|
| 71 | done
|
---|
| 72 |
|
---|
| 73 | type fx
|
---|
| 74 | fx
|
---|
| 75 |
|
---|
| 76 | # errors
|
---|
| 77 | for (( i=0; "i < 3" ))
|
---|
| 78 | do
|
---|
| 79 | echo $i
|
---|
| 80 | done
|
---|
| 81 | echo $?
|
---|
| 82 |
|
---|
| 83 | for (( i=0; i < 3; i++; 7 ))
|
---|
| 84 | do
|
---|
| 85 | echo $i
|
---|
| 86 | done
|
---|
| 87 | echo $?
|
---|
| 88 |
|
---|
| 89 | # one-liners added in post-bash-2.04
|
---|
| 90 | for ((i=0; i < 20; i++)) do : ; done
|
---|
| 91 | echo $i
|
---|
| 92 |
|
---|
| 93 | for ((i=0; i < 20; i++)) { : ; }
|
---|
| 94 | echo $i
|
---|
Note:
See
TracBrowser
for help on using the repository browser.