Shell for-loop

A for loop that iterates through a sequence. A common example of this is to iterate through words in in a string, for example: for i in $( ls ); do echo item: $i done

Authored by: Mike G
Brought to you by Warp, a free terminal reimagined to work like a modern app.
variable
sequence
command

Command
Copy
for variable in sequence; do command done
Tags