ohmkara 1.0

a technical blog.

sam2p bulk conversion script

leave a comment »

I have lots of .jpg files to convert to .eps in a folder, not sure if there is a batch convert option in sam2p  — did not see one in quick glance, hence wrote the following. The following was a bulk conversion bash script that worked for me…

#!/bin/bash
# makeeps.sh
# convert jpg files to eps
match=".jpg"
replace=".eps"
for i in $( ls *.jpg* );
do
    src=$i
    tgt=$(echo $i | sed -e "s/$match/$replace/")
    sam2p $src $tgt
done

Written by deepak

January 12, 2009 at 5:48 pm

Posted in my notes, scripts

Tagged with ,

Leave a Reply