Doc files in unix


















Alternatively, add the -b attribute to save the original file as backup:. You can also use the sed stream editor command to remove the carriage return line endings. The command syntax to do so is:. The tr command is a command line utility for translating or deleting characters.

Pearl on-liners are scripts that fit in a single line of code. Note: Need help finding files on your Linux system? Take a look at how to use the find command or how to show hidden files in Linux. Another way to see the file uses both carriage return and line feed for line endings is to view the file in octal values.

The output displays the content of the file with its octal values, as in the image below. To confirm the file is in Unix format, you can also open view the content in octal values. The simplest and recommended way is using the dos2unix command. If you cannot utilize dos2unix , you have five other options to choose from. Quick Links. Search Forums. Show Threads. Show Posts. Shell Programming and Scripting. Can I view doc files from terminal. Registered User. Join Date: Jul Sometimes I'm working from terminal for long periods of time and I come across a doc file I don't recognize.

I've been trying to figure out how to view it instead of opening up word. I've tried cat but it jumps into binary and my terminal goes nuts. Is there a way I can do this from terminal? Apologies, can someone move this. Join Date: Oct You can use an app called antiword: Antiword: a free MS Word document reader. Join Date: May Last edited by cjcox; at PM.. Reason: adding abiword info. Join Date: Sep It will extract any text strings from a file and leave out all the other stuff.

Code :. Something like this should be avaliable on the net. Then, after you figure out the exact format Word saves its documents, you will be able to convert them to anything you like. All generalizations are false. The source code for it should be available. This is what I did about two years ago. I wrote a program to open a word document in binary and output the contents in hex with ascii printable characters. I then made changes to the document in Word and figured out how it changed to file.

After about two hours, I was able to edit the document in a C program and view the changes in Word. By using the same approach, you should be able to determine where the actual text in a word document is stored in the file.



0コメント

  • 1000 / 1000