Skip to content

Instantly share code, notes, and snippets.



Created Jul 23, 2018
What would you like to do?
Rename files to lowercase, and change spaces to dashes.
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
You can’t perform that action at this time.