How do you write a loop in bash?

How do you write a loop in bash?
Answer
The for loop will take each item in the list (in order, one after the other), assign that item as the
value
of the variable var, execute the commands between do and done then go back to the top, grab the next item in the list and repeat over. The list is defined as a series of strings, separated by spaces.
 

Tìm kiếm

Back
Top