for i in $(seq 1 10); do echo $i; done

Category: Bash Scripting

for i in $(seq 1 10); do echo $i; done

Loop from 1 to 10 using seq

Loops from 1 to 10 using seq to generate the numbers, running a command for each number.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.