#!/bin/bash for file in $@; do convert $file ${file%.*}.jpg done