Published in


5 Ways To Write Loops in Bash

Bash scripting is more interesting than you expected

A ninja man standing on the top of a house
Image from Wallhaven

Loops are indispensable parts of programs and almost all programming languages provide support for writing different types of loops.

Bash also provides ways for writing loops. Some ways are similar to other languages, such as C and Python, but a few ways are very special even weird.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store