#!/usr/bin/env nix-shell #! nix-shell -i bash --pure #! nix-shell -p imagemagick for picture in original/*png; do magick $picture -resize 800x800 -quality 80 $(basename $picture .png)-sm.jpg magick $picture -quality 90 $(basename $picture .png).jpg done for picture in original/*jpg; do magick $picture -resize 800x800 -quality 80 $(basename $picture .jpg)-sm.jpg cp $picture $(basename $picture) done