Bootstrap

Shell循环执行某命令n次

如下脚本是打印’hello word!‘ 3次

#!/bin/bash
i=0
times=2
while [ $i -le $times ]
do
let ‘i++’
echo 'hello word!'
done
;