LOOPS
Loops in bash
allows us to repeat a series of evaluations across a number of values. The values are typically in a sorted numerical range (1-10), but they can also be a list of values. Arrays are often used to store the ranges or lists.
Types of loops
While there are several types of bash
loops, among the most used are:
- IF/THEN/ELSE
- Conditional comparison
- WHILE
- repeat commands until a condition is met
- FOR
- repeat commands for a list OR
- repeat commands over a range.
Prev BASH scripting | Next IF/THEN | UP : BASH scripting | Top : Course Overview © 2017 Texas Advanced Computing Center