/ Published in: Bash

test with echo instead of mv
example removes spaces after dots, replaces spaces with _, removes ' , and -, and finally lowercases filenames
example removes spaces after dots, replaces spaces with _, removes ' , and -, and finally lowercases filenames
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
for F in * ; do NF=`echo $F | perl -lne "s/ /_/g; s/\._/./g; s/[',-]//g; print lc"` ; mv "$F" "$NF" ; done
Comments
