Conversion program/command via CLI


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Conversion program/command via CLI
# 1  
Old 02-28-2016
Conversion program/command via CLI

I already know about the docx2txt program, and it's extremely helpful. ssconvert is also really helpful, but unlike docx2txt, it works both ways. How does one convert a .txt file to .docx via CLI, or is it even possible??

This:
Code:
docx2txt example.docx

results in making a .txt file out of the original .docx file.

What I want to know is, is there a way to do the exact opposite in the Command Line?? Making a .docx file out of a .txt file??

P.S. I am using Xubuntu 14.04.4, 64-bit.

Moderator's Comments:
Mod Comment edit by bakunin: corrected typo in the title.

Last edited by bakunin; 03-02-2016 at 08:13 AM..
# 2  
Old 02-29-2016
The main difference between a .doc and a .txt is formatting like bold face typing, colours, tables, hyphenation, what have you, and/or embedded pictures etc.. All of this is missing in a plain .txt. You can open it as is with e.g. writer.
This User Gave Thanks to RudiC For This Post:
# 3  
Old 03-01-2016
Is there a way to convert a .txt file to a .docx file?? Also, I can't seem to find this "writer" program that you mentioned.

---------- Post updated at 03:42 PM ---------- Previous update was at 03:27 PM ----------

I have found the solution. The program "abiword" comes with a CLI option that is typed

Code:
abiword -t <desired format> <file>

It can do both .doc and .docx file to .txt, and even vise versa. It's actually really convenient.

@ RudiC

Thank you for your time and effort, what you said inspired me to do some man page research, which lead to the solution that I found.

---------- Post updated at 03:47 PM ---------- Previous update was at 03:42 PM ----------

In addition, the program "docx2txt" can only go from .docx to .txt. The abiword program can do both .doc and .docx, and several more to .txt, and vise versa. Because of that, the "docx2txt" program seems a little redundant, no?? Just something I wanted to add to that.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Running a command in another cli

I am writing a script to login to to a mongo DB node and get the status of that machine. The usual work flow is : # mongo admin -u root -p root MongoDB shell version: 3.0.11 connecting to: admin rs0:SECONDARY> Then in the new prompt I can run a command to check status : ... (0 Replies)
Discussion started by: Junaid Subhani
0 Replies

2. AIX

Command to see the status of managed node from CLI of HMC?

Folks, Asking a silly question - is there a way to know the status(Power Off/Running) of a managed node from CLI of HMC, alike the way we see it for the LPARs running on the node from 'vtmenu'? Most of us use the UI to see the status of the LPARs/Managed node - but just inquisitive to know if... (4 Replies)
Discussion started by: thisissouvik
4 Replies

3. Linux

Way to execute a command from CLI

OS : Linux Kernel ver : 2.6x Is there any legit difference between way that shell interprets the below mentioned command lines in Linux environment? Option A> . <exec_file_name> arg1 agr2 Option B> ./<exec_file_name> arg1 agr2 The reason for me asking this silly question is... (2 Replies)
Discussion started by: kumarjt
2 Replies

4. Shell Programming and Scripting

Case conversion within a command

Hi All, I need the variable to be set in both uppercase and lowercase in a single command DATABASE=ORCL something like the below which is absolutly wrong find /ora/admin/11.1.0/diag/rdbms/{print tolower($0)}${DATABASE}/{print toupper($0)}${DATABASE} The o/p should be as below:... (4 Replies)
Discussion started by: jjoy
4 Replies

5. Shell Programming and Scripting

Characterset conversion problem using iconv command

Hi Friends, I am not able to conver character set from UTF-8 to IBM-284 throwing an error "cannot open convertor" . Could you please help me how to get out of this error. Below command is working fine iconv -f ISO8859-15 -t UTF-8 fromfile.txt > tofile.txt But the below command is... (2 Replies)
Discussion started by: sivakumarl
2 Replies

6. Shell Programming and Scripting

Date command output conversion

hi all, i need to measure time difference between the time a process started, to the time it ended. i am assuming the following are the steps: 1. output 'date' command at start time 2. output 'date' command at end time 3. subtract the two question is, how do i subtract the two time... (4 Replies)
Discussion started by: rathajs
4 Replies

7. Solaris

Bad command error for date conversion

Hi, Iam trying to convert date and time to milliseconds which iam using in a script on Sun Solaris. I have searched the posts on the forum but i could not get any solution. The format iam using in script is: date -u "Thu Dec 24 00:01:00 EST 2009" But i get a bad command error. ... (6 Replies)
Discussion started by: jyothi_wipro
6 Replies

8. Shell Programming and Scripting

Command for unix to dos conversion

Dear All Could you please advice how do we convert a unix file to dos I know one command,ux2dos, which somehow does not work to give desired output Inputs on this is appreciated Thanks, Suresh (3 Replies)
Discussion started by: sureshg_sampat
3 Replies

9. UNIX for Dummies Questions & Answers

Script to open program and send/execute command in program

Hi, i want to write a script that executes a program (exec?) . this program then requires a filename as input. how do i give it this input in the script so the program will be complete run and close by the script. e.g. exec prog.exe program then asks for filename "enter filename:"... (1 Reply)
Discussion started by: tuathan
1 Replies

10. Programming

Capturing cli Program output

A few years ago I took a C programming class and used both Linux and FreeBSD as my operating systems and gcc as the compiler. I ran a Command-line utility to to capture what happened as I ran the code, the output was saved to a file that I specified when I ran the utility command (that I can't... (1 Reply)
Discussion started by: Christopher
1 Replies
Login or Register to Ask a Question