On Sat, Sep 23, 2000 at 08:23:34PM +1000, Dave Kempe wrote:
>
> The first 3 lins of the script give me problems, I'm not sure of the case
> syntax. I tried a fair few combinations but can't seem to get case figured
> out.
I've attached a version with minimal changes to make it work, the
syntax for case etc. is fairly simple once you've seen an example.
> If anyone can assist that would be great. Or even suggest a better method...
ps2pdf doesn't really need the second argument, so you don't need to
play around with basename. The following works (after cd'ing into
the directory):
for i in *.ps; ps2pdf $i; rm -f $i; done
or, using your friend find you can do it hierarchies:
find . -name "*.ps" -exec ps2pdf '{}' \; -exec rm -f '{}' \;
(replace . with the directory to descend, eg '/' to clean out the
whole box).
Conrad.
pdfsweeper.sh