> For the complete documentation index, see [llms.txt](https://til.yulrizka.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://til.yulrizka.com/bash/bash-forloop.md).

# bash forloop

Example of forloop syntax

```bash
for i in 1 2 3 4 5
do
   echo "i=$i"
done
```

with range

```bash
for i in {1..5}
do
   echo "i=$i"
done
```

cutomize increment

```bash
for i in {0..10..2}
do 
   echo "i=$i"
done
```
