Created
September 18, 2022 17:37
-
-
Save andreyshuster/0adf582163276020914d659d7dffd9c4 to your computer and use it in GitHub Desktop.
replace spaces with dashes if filenames
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
# delete first echo for real results | |
for file in *; do echo mv "$file" "$(echo $file | sed 's/ - /_/g ; s/ /-/g')" ; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment