All pictures can be processed by invoking script make_smaller.sh for each picture.
Example 2. Processing sequentially
#!/bin/bash MAKE_SMALLER=$PWD/make_smaller.sh IMGS_DIR=$PWD/imgs TARGET_DIR=$PWD/imgs_smaller for file in $IMGS_DIR/*; do bash $MAKE_SMALLER $file > $TARGET_DIR/${file##*/} done