1
我正在使用python並執行以下命令。Bash%d從0開始,我可以讓它從1開始
subprocess.Popen(['convert '+document+' '+outFile+'_page%04d.tif'],
stdout=subprocess.PIPE, shell=True).wait()
它工作正常,但我結束了我的XXX_page0000.tif輸出作爲我的第一頁,然後編號了。
是否有可能拿到%04D在bash在1而不是0
所以,我的第一個輸出文件是XXX_page0001.tif開始?
這沒有什麼關係'bash'。 '%d'是'convert'程序處理的東西。 – larsks
http://www.imagemagick.org/script/command-line-processing.php#input – jpkotta