Return to Snippet

Revision: 36491
at November 22, 2010 08:32 by zitter


Initial Code
for f in *; do
     file=$(echo $f | tr A-Z a-z | tr ' ' _)
     [ ! -f $file ] && mv "$f" $file
done

Initial URL
http://www.linuxquestions.org/questions/programming-9/bash-script-to-remove-capitalisation-and-spaces-form-a-filename-309567/

Initial Description


Initial Title
Remove cap and space from filename using bash

Initial Tags
Bash

Initial Language
Bash