Created
August 9, 2019 22:20
-
-
Save dvliman/ea3926c9320b150317bdf87dbe59fc88 to your computer and use it in GitHub Desktop.
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
# rename files to have underscores instead of ' ', '(', and ')' - runs on * or takes extension argument: i.e., `rename_filename_chars txt` | |
rename_filename_chars() { for file in *"$1"; do mv -n "$file" $(echo $file | sed -e "s/ /_/g" | sed -e "s/(/_/g" | sed -e "s/)/_/g"); done } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment