方法一:
while循环,用的比较多的
#!/bin/bash
set j=
while true
do
let "j=j+1"
echo "----------j is $j--------------"
done
方法二:
for ,看到这个用法时,看来是真真了解了for的含义
#!/bin/bash
set i=
set j=
for((i=;i<;))
do
let "j=j+1"
echo "-------------j is $j -------------------"
done