Saturday, April 20, 2024
11
rated 0 times [  11] [ 0]  / answers: 1 / hits: 19799  / 2 Years ago, mon, june 13, 2022, 9:35:35

As I mentioned there , how can I view documents( ex: .doc,.docx and all other formats ) from the command line ? Is there any way ?



Thank you.


More From » command-line

 Answers
7

I have been using the following setup in several scripts (especially with version control):



sudo apt-get install unoconv odt2txt     # installs both tools
doc2odt test.doc # creates test.odt
odt2txt test.odt # displays the contents in the terminal


or for a docx file:



docx2txt test.docx                       # converts docx file
less test.txt # read the contents


Works like a charm and you can read your doc files in the terminal. This method is more complex than catdoc but it has the advantage that entries from a bibliographic management system are not displayed in their raw form.



For a LaTex file you can just your favorite terminal text editor to open and read it.


[#28779] Tuesday, June 14, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
oatglori

Total Points: 313
Total Questions: 102
Total Answers: 111

Location: Guam
Member since Thu, May 18, 2023
1 Year ago
;