To make sure that this script works correctly, check that ImageMagic pack is installed on your Linux machine.
#! /bin/bash dir=$1 target_dir=$2 mkdir -p $target_dir list=`ls -1 $1` for i in $list do echo $i convert $dir/$i -resize 50% $target_dir/$i done
Usage:
./convert_50.sh Pictures/temp/ Pictures/temp_new
This will resize all images in location Pictures/temp/ for 50% and will copy them to new location Pictures/temp_new