From ec985c762b1ab4e96d172240868ecebdfc3cca29 Mon Sep 17 00:00:00 2001 From: "Jesus Alvarado Jr." <166447390+JesusAlvarado48@users.noreply.github.com> Date: Fri, 13 Mar 2026 23:00:41 +0000 Subject: [PATCH] Add beginner-friendly example showing how to loop through files --- what-are-loops/for_loop_files | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 what-are-loops/for_loop_files diff --git a/what-are-loops/for_loop_files b/what-are-loops/for_loop_files new file mode 100644 index 0000000..f85e926 --- /dev/null +++ b/what-are-loops/for_loop_files @@ -0,0 +1,10 @@ +#!/bin/bash + +# A script to loop through all .txt files in the current directory +# and print their names. This demonstrates how for loops can be used +# with file patterns in real-world scenarios. + +for file in *.txt +do + echo "Found file: $file" +done