unixify.sh is a simple shell
script I use to sanitize files people send me, often from other operating
It cleans up file names by removing most punctuation and converting spaces to underscores and upper case to lower case. For example, it converts Foo, Bar, & Baz (Special).JPEG to foo_bar_and_baz_special.jpg.
It also re-compresses images with ImageMagick, removes carriage returns from DOS and Windows style CRLF line endings, and converts Microsoft Word documents to plain text with antiword.
It supports dry runs via the
-n flag, which just prints what would be done
instead of actually doing it.