I have created a linux script to convert files from .odt to .pdf
But the script after converting moves files into same dir where script is executed. As script is recurring I want files to stay in the same where originals are.
Here is the script.
#!/bin/bash for file in $(find -type f -name '*.odt') do echo $file libreoffice --headless --convert-to pdf $file #libreoffice --headless --convert-to pdf $file done #find -type f -name '*.odt' -print0 | xargs -0 libreoffice --headless --convert-to pdf
I have tried setting
--outdir to be path of directories but it moves all files to those directories. I want converted files to stay in same directory as original files.
Go to Source