while condition
do
command
done
例子:
#!/bin/bash
int=1
while (($int<=5))
do
echo $int
let "int++"
done
while :
do
command
done
while ture
do
command
done
原文:https://www.cnblogs.com/huangdengtao/p/13149582.html