Menu

Toshimaru's Blog

Bash for Loop in one-line

command

Write N times for loop in bash one-line.

$ for i in {1..10}; do echo $i ; done

The output:

1
2
3
4
5
6
7
8
9
10

See also

Load more