A lot of ops work is the same step repeated: every server in a list, every file in a folder, every line in a CSV. Loops let a script do that without copy-paste. Reach for for over a glob or list, while read for a file line by line, and until to wait for something to come up. Never loop over $(ls), which breaks on names with spaces, and watch out for a piped while losing its variables.