don*_*oey 11
我一直在几个脚本中使用以下设置(尤其是版本控制):
sudo apt-get install unoconv odt2txt # installs both tools
doc2odt test.doc # creates test.odt
odt2txt test.odt # displays the contents in the terminal
Run Code Online (Sandbox Code Playgroud)
或对于 docx 文件:
docx2txt test.docx # converts docx file
less test.txt # read the contents
Run Code Online (Sandbox Code Playgroud)
像魅力一样工作,您可以在终端中阅读您的文档文件。这种方法比catdoc书目管理系统中的条目不以其原始形式显示更复杂,但它的优点是。
对于 LaTex 文件,您可以使用自己喜欢的终端文本编辑器来打开和阅读它。
为了从命令行查看 word 文档,我发现了一个名为 catdoc 的文档。
安装它 sudo apt-get install catdoc
然后
catdoc -t filename.doc
Run Code Online (Sandbox Code Playgroud)
您可以使用 -a(文本)或 -t(LaTeX)选项指定输出格式