quick linux question
-
19-09-2019 - |
Question
I'm trying to do the following:
$OOOPYTHON DocumentConverter.py .odt .pdf
for all of the ODT files i have in a particular document and looking for the right syntax to convert all odts to pdfs.
Thanks! Jake
Solution
for file in *.odt; do
$OOOPYTHON DocumentConverter.py "$file" "${file%.odt}.pdf"
done
OTHER TIPS
You can use 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
or whatever the actual command syntax is
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow