Created
November 24, 2019 23:18
-
-
Save unimonkiez/3ce9a1dd39c1ded5181631befbd08827 to your computer and use it in GitHub Desktop.
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 | |
#source ~/.my_custom_commands.sh | |
function rename-folder() { | |
for f in *.*; do | |
newname=`echo "$f" | sed -E "s/$1/$2/g"` | |
if [ $3 == 'do' ] | |
then | |
mv "$f" "$newname" | |
else | |
echo "$newname" | |
fi | |
done | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment