Home » Posts tagged 'Bash'

Tag Archives: Bash

Convert multiple ps files into pdf using ps2pdf

Unfortunately ps2pdf doesn’t allow that. But with a script as simple as that it will convert all ps files in your working directory into pdf and delete the original files:

#!/bin/bash
##
## Written by Leonard Burtscher (burtscher@mpia.de)
## 20 Apr 2010
##
##
## PURPOSE
##
##
## To transform all ps files of a directory into pdf using ps2pdf
## Then delete all ps files
##
filelist=`(find . -name \*.ps)`
for i in $filelist; do
ps2pdf $i
rm $i
echo ‘Converted $i into pdf, deleted original file.’
done
#!/bin/bash

filelist=`(find . -name \*.ps)`

for i in $filelist; do

        ps2pdf $i

        rm $i

        echo 'Converted $i into pdf, deleted original file.'

done

I am currently moving my social media presence from Twitter to Mastodon

My Tweets