作者:Coco李可儿 | 来源:互联网 | 2023-08-15 13:08
HowcanIiteratethroughasimplerangeofintsusingaforloopinksh?如何在ksh中使用for循环遍历一个简单的整数范围?
How can I iterate through a simple range of ints using a for loop in ksh?
如何在ksh中使用for循环遍历一个简单的整数范围?
For example, my script currently does this...
例如,我的脚本目前正在执行此操作...
for i in 1 2 3 4 5 6 7
do
#stuff
done
...but I'd like to extend the range way above 7. Is there a better syntax?
...但是我希望将范围扩展到7以上。有更好的语法吗?
7 个解决方案