大家好,又见面了,我是你们的朋友全栈君。
如下脚本是打印’hello word!‘ 3次
#!/bin/bash
i=0
times=2
while [ $i -le $times ]
do
let ‘i++’
echo 'hello word!'
done
发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/163970.html原文链接:https://javaforall.net
Shell循环执行某命令n次如下脚本是打印’helloword!‘500次#!/bin/bashi=0times=500while[$i-le$times]doecho’helloword!’done
大家好,又见面了,我是你们的朋友全栈君。
如下脚本是打印’hello word!‘ 3次
#!/bin/bash
i=0
times=2
while [ $i -le $times ]
do
let ‘i++’
echo 'hello word!'
done
发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/163970.html原文链接:https://javaforall.net