Created
July 8, 2019 05:56
-
-
Save lewisxy/e74ea88b1b8b169b63e19f5725a6c8d1 to your computer and use it in GitHub Desktop.
Shell script that replace all files with "%20" back to space in current directory
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
for file in * | |
do | |
if [[ "${file}" =~ (.*)%20(.*) ]] | |
then | |
mv "$file" "$(echo $file | sed "s/%20/ /g")" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment