第一类:数字性循环
-----------------------------
for1-1.sh
#!/bin/bash
for((i=1;i<=10;i++));
do
echo $(expr $i \* 3 + 1);
done
-----------------------------
for1-2.sh
#!/bin/bash
for i in $(seq 1 10)
do
第一类:数字性循环
-----------------------------
for1-1.sh
#!/bin/bash
for((i=1;i<=10;i++));
do
echo $(expr $i \* 3 + 1);
done
-----------------------------
for1-2.sh
#!/bin/bash
for i in $(seq 1 10)
do