How do you write a for loop in Linux?

How do you write a for loop in Linux?
Answer
The basic syntax of a for loop is:
for <variable name> in <a list of items>;do <some command> $<variable name>
;done; The variable name will be the variable you specify in the do section and will contain the item in the loop that you’re on.
 

Tìm kiếm

Back
Top