Created
June 14, 2019 12:49
-
-
Save gukandrew/15834e5d66102f6b50e867e96972d5b5 to your computer and use it in GitHub Desktop.
Shell Batch rename files using string replacement
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
for file in *string-to-replace*; do | |
newname=$(echo $file | sed "s/string-to-replace//"); | |
mv $file $newname; | |
done; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment