Created
December 22, 2018 14:44
-
-
Save gyakkun/9cb17cd895750da8ea69de79cac241aa to your computer and use it in GitHub Desktop.
handle_space_in_for_loop_shell_script.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
IFS=$'\n' | |
OLDIFS="$IFS" | |
for i in $(find . -depth -name a.txt); do | |
rename -v "s/a(?=(\.txt))/b/" $i | |
# echo $i | |
done | |
IFS="$OLDIFS" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment