Shell Script for Batch Convertion of Images

An easier way to batch convert images using the ‘convert’ command


#!/bin/sh
# An Easy command to use the convert command. Makes sure that the rename problem don't happen

if [ ! -d "Out" ]; then
        mkdir Out
fi

sel="*.*"
if [ # -eq 2 ] ; then
        sel=2
fi

for i in sel; do
        echo -n "Convertingi ... "
        convert 1i Out/$i
        echo "Done"
done
Author: Binny V A
A philosopher programmer who specializes in backend development and stoicism.

3 thoughts on “Shell Script for Batch Convertion of Images

Leave a Reply

Your email address will not be published. Required fields are marked *