Skip to content

Instantly share code, notes, and snippets.

@gauravpaliwal
Created August 22, 2011 16:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gauravpaliwal/1162778 to your computer and use it in GitHub Desktop.
Save gauravpaliwal/1162778 to your computer and use it in GitHub Desktop.
Shell Script to rename and decrease size of photo in one go
#rename JPG to jpg
for i in *.JPG;
do mv $i `basename $i JPG`jpg;
done
#resizing photos
for i in *.JPG;
do convert $i -resize 600x400 $(basename $i .JPG).JPG;
done
#source : http://playingwithsid.blogspot.com/2010/08/how-to-resize-photos-with-bash-shell.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment