ohmkara 1.0

a technical blog.

sam2p bulk conversion script

with one 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
Advertisements

Written by deepak

January 12, 2009 at 5:48 pm

Posted in my notes, scripts

Tagged with ,

One Response

Subscribe to comments with RSS.

  1. This is excellent. Thanks for working it out!

    mander

    January 18, 2011 at 2:33 am


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: