Introduction

Not all command-line utilities allow you to run a command against multiple files, but with the power of shell scripting and the for loop, you can super charge any command you choose.

Looping is one of the most powerful things you can do in programming. It allows you to apply the same logic over and over to a group of items with minimal code.

In this tutorial you’ll iterate over files and apply commands using either the Bash or zsh shells.

#loop #developer

How To Loop Through Files in a Directory
2.25 GEEK