From 66f11c61c5cae6dacd11c4f7e8e55568214a9564 Mon Sep 17 00:00:00 2001 From: danielpolson Date: Thu, 12 Jun 2025 12:12:48 -0700 Subject: [PATCH] Updated bash9 --- bash/bash9.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bash/bash9.sh b/bash/bash9.sh index fc7d6a0..3973a03 100644 --- a/bash/bash9.sh +++ b/bash/bash9.sh @@ -1 +1,4 @@ -# write a loop to replace spaces to underscores in all file names in the current directory +for file in *; do + echo "${file// /_}" + mv "$file" "${file// /_}" +done