Created
July 23, 2018 10:24
-
-
Save nicdoye/3d3c08af0982ea427bff7b34ca5f83d9 to your computer and use it in GitHub Desktop.
Rename files to lowercase, and change spaces to dashes.
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 | |
lc() { | |
for i in * ; do j="$(echo $i | tr '[:upper:]' '[:lower:]' | tr ' ' '-' )" ; [ "$i" != "$j" ] && mv "$i" "$j"; done | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment