Hi!
I have a folder with many subfolders. Each of these subfolders contain several Postscript (.ps) - files. Now I want to convert the ps-files in all of these folders into pdf format, doing so with a Bash Shell Script.
This is what I got so far:
Code:
#! /bin/bash
echo `pwd`
DIR=`pwd`/Desktop/MFold_Output
cd $DIR
echo `pwd`
#ls -l $DIR
#echo $DIR
for dir in `ls`
do
echo $dir;
cd $dir
echo `pwd`
for file in `ls *.ps`
do
echo $file;
done
cd ..
done
The parent folder is 'MFold_Output'. in the first for-loop, I go into this parent folder and list all subfolders. The second for-loop enteres each subfolder and lists its containing ps - files.
The Script is working so far.
My problem is how to actually convert the ps to pdf, eventuallly using xargs. It would also be good if the ps files wouln't be deleted.
Cheers,
Jurgen