Created
August 2, 2019 09:54
-
-
Save joduplessis/72cbd33619e8596aae7fc9efdaf13b25 to your computer and use it in GitHub Desktop.
Handy little script to rename files on MacOS (haven't tested on other *nix systems - but should work) in bulk.
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
#!/bin/bash | |
# Renames all SVG files & convert commas to underscores, etc | |
find . -type f -name "*.svg" -print0 | while IFS= read -r -d '' file; do | |
mv "$file" "$(echo $(echo "$file" | tr ',' '_' | tr -d ' '))" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment