Created
June 18, 2021 06:15
-
-
Save zhanang19/4dd618ad7d788e8264dfaea693475db9 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
for f in * | |
do | |
new="${f//_/ }" | |
if [ "$new" != "$f" ] | |
then | |
if [ -e "$new" ] | |
then | |
echo not renaming \""$f"\" because \""$new"\" already exists | |
else | |
echo moving "$f" to "$new" | |
mv "$f" "$new" | |
fi | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment