On 09/03/10 09:19, Istvan Gabor wrote:
2010. március 8. 20:29 napon Anton Aylward <anton.aylward@rogers.com> írta:
Istvan Gabor said the following on 03/08/2010 12:22 PM:
Hello:
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 a single file with no white spaces in the name it would be "pdftops infile.ps outfile.pdf".)
Read the BASH (SH) man page.
Look under "for" and "list", as in
for name in ...list... do .... done
I do know how to use for loops, I have problem with white spaces in file names. Can $i handle these files?
The ABS comes up often, but it really is very good: http://tldp.org/LDP/abs/html/quoting.html http://tldp.org/LDP/abs/html/loops1.html Specifically make sure you quote the variables correctly and the whitespace will cause no problem. Read some of the examples, and do some quick experimentation, and it'll all seem so simple. for i in *; do pdftops "$i" "${i/%pdf/ps}" done Regards, Tejas -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org