#!/bin/sh find . -name \*.jpg | while read a; do convert "$a" -quality 80 "$a" done