Skip to content

Instantly share code, notes, and snippets.

@maxpeterson
Last active December 20, 2015 00:59
Show Gist options
  • Select an option

  • Save maxpeterson/6045436 to your computer and use it in GitHub Desktop.

Select an option

Save maxpeterson/6045436 to your computer and use it in GitHub Desktop.
for file in $(shopt -s nullglob; echo screenshots/*.jpg); do
echo convert "$file" -resize 200x150 "${file%%.*}-thumb.${file##*.}";
cp "$file" "${file%%.*}-full.${file##*.}";
convert "$file" -resize 200x150 "${file%%.*}-thumb.${file##*.}";
done;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment