2
当一个人击:标准输出拼图
process > file
标准输出被写入到一个文件中只有一次的过程就结束了。有没有办法马上写出来?
也就是说,我在做批量转换odt2pdf有:
libreoffice --convert-to pdf:writer_pdf_Export *.odt
所以LibreOffice的说,关于哪些文件会被马上处理。但是,当我这样做:
libreoffice --convert-to pdf:writer_pdf_Export *.odt > log
信息只写一次我关闭libreoffice。 (我想读在日志中的行数 - 这样,当所有文件都处理我就杀了LibreOffice的和)
编辑:
我发现我误会的LibreOffice的命令行选项起初:--invisible
- 所以它会在它必须做的之后自杀 - 所以我不需要自己杀死它 - 因此no problem any more。
http://www.pixelbeat.org/programming/stdio_buffering/ –
尝试'unbuffer libreoffice --convert-to pdf:writer_pdf_Export * .odt> log'。祝你好运。 – shellter
@shellter它的工作原理!我发现'--invisible'命令行选项 - 所以我不需要再那样做了。非常感谢你 - 我写下了'unbuffer'。这是一个很好的技巧工具。 – Adobe