Article From:https://www.cnblogs.com/sea-stream/p/9687912.html
Write all the loop syntax in the shell script.For cycle:For I in $(LS); doEcho item:$iDoneWhile cycle:/bin/bashCOUNTER=0While [$COUNTER -lt 10]; doEcho The counter is $COUNTERLet COUNTER=COUNTER+1DoneUntil cycle:/bin/bashCOUNTER=20Until [$COUNTER -lt 10]; doEcho COUNTER $COUNTERLet COUNTER-=1Done

  

Leave a Reply

Your email address will not be published. Required fields are marked *