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