The question is: "Do such programs exist that allow opening doc, docx, odf files in the linux terminal?". I understand that theoretically this is not possible, due to the absence of the possibility of programmatic font changing in the terminal. But! What if, for example, I need to stupidly read the text from a file, but I don’t have a desktop machine at hand? Or you can have this option: the program converts the doc, docx, odf file into a tex file. PS: I think that this option of opening such files will also be more economical than the desktop relative to the memory.

With xlsx and files like this, the same question comes up too. Dad once told me simply that when there were no desktop axes and shell graphs, they used some dos console console and some tables instead of excel instead of docs. I would be grateful for the answer.

UPD : The question is closed

    3 answers 3

    When there were no graphical shells, then the formats were different too. Something somewhat similar to the modern markdown

    Files of course you can read. But just to read it - after converting it to text format. So Excel files can be converted to CSV - and then look at least in less, even awk or sed further convert.

    Word files are converted to plain TXT - only text and no formatting. It is possible and in RTF - here the design will be preserved, but to read them you need a certain skill :)

    And from a practical point of view, the task is quite relevant. Constantly we have to solve problems like "We have a price list in Excel - we want to automatically upload it to the site in the database." Accordingly, in addition to the console utilities, there is also a bunch of libraries for different programming languages ​​- allowing you to open, read, edit and save files of these formats without a tricky GUI.

    • But could you give the name of such a program or will you have to write the converter yourself? And is there something like a manual how to read rtf? - Semior
    • Thanks for the answer. The question is closed. - Semior

    To view the doc, you can use catdoc , antiword and many similar programs.

    for viewing docx you can use, for example, docx2txt .

    for viewing odf / odt you can use, for example, odt2txt .

    for viewing xlsx you can use, for example, xlsx2csv .


    All the above programs are available in the packages of the same name in the debian distribution repository of the gnu / linux operating system. surely they are in the already assembled form and in the repositories of other popular distributions. in extreme cases, you can compile - p. free, source code is publicly available.

      The question has already been closed for a long time, but now I’ve got an additional solution: You can write your own application that reads the excel file and outputs its contents to the terminal using the apache-poi java library.