#!/bin/bash # take two arguments (first a jpeg) and make a thumbnail size version # stored in the second argument (djpeg < $1) | pnmscale -xysize 100 150 | cjpeg > $2 # exit code is taken from last command(s) executed if not given explicitly