On Monday 08 March 2010 20:01:20 David Haller wrote:
Hello,
On Mon, 08 Mar 2010, Istvan Gabor wrote:
I would like to convert several ps files to pdf using pdftops. What would be the correct command line for batch processing if the ps filenames have white spaces and I have many files in the same directory?
for file in *.ps; do pstopdf "${file}" done
IIRC, the "outfile" is optional. You can use it explicitly with:
pstopdf "${file}" "${file//.ps/.pdf}" ## requires a POSIX shell,
That would replace any and all occurrences of ".ps" in a file name with ".pdf" . That may be okay if there is only one occurrence but, to make sure that only the extender is replaced, this would be a better choice: pstopdf "${file}" "${file%.ps}.pdf" Regards, David Bolt -- Team Acorn: www.distributed.net OGR-NG @ ~100Mnodes RC5-72 @ ~1Mkeys/s openSUSE 11.0 32b | | | openSUSE 11.3M3 32b openSUSE 11.0 64b | openSUSE 11.1 64b | openSUSE 11.2 64b | TOS 4.02 | openSUSE 11.1 PPC | RISC OS 4.02 | RISC OS 3.11 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org