for

#!/bin/bash
set i=0
set j=0
for((i=0;i<10;))
do
        let "j=j+1"
        echo "-------------j is $j -------------------"
done

 

while

#!/bin/bash
set j=2
while(true)
do
        let "j=j+1"
        echo "----------j is $j--------------"
done

 

相关文章:

  • 2022-01-26
  • 2022-12-23
  • 2022-12-23
  • 2021-07-10
  • 2022-03-07
  • 2021-09-26
  • 2022-01-18
  • 2022-12-23
猜你喜欢
  • 2022-02-09
  • 2022-01-04
  • 2022-02-08
  • 2022-02-08
  • 2021-10-31
  • 2021-11-07
相关资源
相似解决方案