Created
November 2, 2019 23:02
-
-
Save psema4/2d7f273438a346cb47afdadb8eff9f3b to your computer and use it in GitHub Desktop.
search and replace in filenames
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
# Search and replace filenames in the current directory | |
# | |
# Example: | |
# tile-000.png | |
# tile-001.png | |
# tile-002.png | |
# | |
# becomes | |
# sprite-000.png | |
# sprite-001.png | |
# sprite-002.png | |
# | |
ls *.png | while read fn; do | |
mv "${fn}" "${fn/tile-/sprite-}"; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment