#!/bin/sh for x in *.jpg; do convert -scale 50% $x $x done