Last active
March 7, 2017 02:11
-
-
Save npyoung/485c0996b2e30684fa255f29936cd15d to your computer and use it in GitHub Desktop.
Substring replacement in file names in the working directory
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 fn in *; | |
| do mv "$fn" "${fn//$1/$2}"; | |
| done; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment