Bourne Shell For i in (seq)

后端 未结 6 877
陌清茗
陌清茗 2020-12-29 10:37

I want to write a loop in Bourne shell which iterates a specific set of numbers. Normally I would use seq:

for i in `seq 1 10 15 20`
   #do stuf         


        
6条回答
  •  一向
    一向 (楼主)
    2020-12-29 11:11

    I find that this works, albeit ugly as sin:

    for i in `echo X \n Y \n Z ` ...
    

提交回复
热议问题