When one does
process > file
Standard output gets written to a file only once the process is over. Is there a way to write it right away?
Namely, I’m doing batch conversion odt2pdf with:
libreoffice --convert-to pdf:writer_pdf_Export *.odt
So libreoffice says about which files are processed right away. But when I do:
libreoffice --convert-to pdf:writer_pdf_Export *.odt > log
The information is written only once I close libreoffice. (I want to read the number of lines in the log – and this way I’ll kill libreoffice when all files are processed)
Edit:
I found a command line option of libreoffice which I misunderstood at first: --invisible – so it will kill itself after what it has to do – so I don’t need to kill it myself – hence no problem any more.
try
Note to general readers,
unbufferis not always available as a std binary in old-style Unix platforms and may require a search and installation for a package to support it.Also note that O.P. @Adobe found that
libreofficehas an--invisibleoption that solved the issue, i.e.I hope this helps.