質問
私は次のことをしようとしています:
$ oooopython documentconverter.py .odt .pdf
特定のドキュメントにあるすべてのODTファイルについて、すべてのODTをPDFに変換する適切な構文を探しています。
ありがとう!ジェイク
解決
for file in *.odt; do
$OOOPYTHON DocumentConverter.py "$file" "${file%.odt}.pdf"
done
他のヒント
find、exを使用できます。
find /path/to/files/ -name '*.odt' -exec python /path/to/DocumentConverter.py '{}' '{}.pdf' \;
for file in `ls *.odt`
do
DocumentConverter.py $file ${file%.odt}.pdf
done
または実際のコマンド構文が何であれ
所属していません StackOverflow