Re: how to write this simple script command?



Lew Pitcher wrote:


begin sample script a2pdf

#!/bin/bash
# Usage: a2pdf path-to-text-file
rm -f temp.ps
a2ps --output=temp.ps $1
ps2pdf temp.ps
rm -f temp.ps

end sample script a2pdf

Thank you. I have just figured out myself. Following is better, because foo.txt will get foo.txt.pdf and bar.txt will get bar.txt.pdf

#!/bin/bash
a2ps --output=$1.ps $1
ps2pdf $1.ps
rm -f $1.ps
.