Loops in shell scripts
1. For Loops
- Iterate over a finite list of items (files, names, servers).
Syntax:

2. While Loops
- Repeat commands while a condition is true.
Syntax:
Notes:
foris best for known lists.whileis best for unknown/conditional repetitions.- Use
$(( ))for arithmetic operations.
