Skip to content

Instantly share code, notes, and snippets.

@leopic
Created December 3, 2012 22:37
Show Gist options
  • Save leopic/4198773 to your computer and use it in GitHub Desktop.
Save leopic/4198773 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Convert jpg files into pngs
for img in *.jpg
do
convert "$img" "$img.png";
rm "$img";
done
# renaming files from .jpn.png to .png
rename 's/\.jpg\.png/\.png/' *.png
# removing extra spaces
rename 's/ //' *.png
# toLowerCase
rename 'y/A-Z/a-z/' *
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment