【发布时间】:2010-04-16 14:04:36
【问题描述】:
我目前正在运行这个脚本,它适用于除一个以外的所有实例:
#!/bin/sh
pdfopt test.pdf test.opt.pdf &>/dev/null
pdf2swf test.opt.pdf test.swf
[ "$?" -ne 0 ] && exit 2
上面的代码后面要执行更多的行...
如果“pdf2swf test.opt.pdf test.swf”失败,我将如何更改此脚本以运行“pdf2swf test.pdf test.swf”?如果第二次尝试失败,那么我会“exit 2”。
谢谢
【问题讨论】:
-
这太快了,
pdfopt可能无法在pdf2swf运行之前完成。让前一个块直到完成。
标签: linux bash shell command pdf2swf