Find the answer to your Linux question:
Results 1 to 3 of 3
Hello Everyone, I need to search and replace text within several hundred .doc and .docx files but I've only been able to find tutorials on how to search and replace ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Nov 2011
    Posts
    5

    Need To Search For Text In .DOC & .DOCX Files & Replace


    Hello Everyone,

    I need to search and replace text within several hundred .doc and .docx files but I've only been able to find tutorials on how to search and replace text within basic text files. Does such a utility exist for the Linux world? Any help is greatly appreciated!!

  2. #2
    Linux User Krendoshazin's Avatar
    Join Date
    Feb 2005
    Location
    London, England
    Posts
    471
    I'm afraid it's not quite as simple as grepping a text document. Word documents are encoded so that pictures, formatting, etc., will all be rendered properly by a given program. If you open up a .docx file in a text editor it will just look like random garbage. If you were able to convert the file to text in order to modify it, then you would lose all of your formatting, etc.

  3. #3
    Just Joined!
    Join Date
    Nov 2011
    Posts
    5
    Quote Originally Posted by Krendoshazin View Post
    I'm afraid it's not quite as simple as grepping a text document. Word documents are encoded so that pictures, formatting, etc., will all be rendered properly by a given program. If you open up a .docx file in a text editor it will just look like random garbage. If you were able to convert the file to text in order to modify it, then you would lose all of your formatting, etc.

    I apologize for replying so late, the notification was lost in my Spam folder. I noticed that Windows 7 can actually search within .doc & .docx if you click on the "Windows Icon" on the lower left hand corner of your screen in Windows 7 and type someting in the Search Programs & Files field. That seems simple enough but I'm guessing it would be very difficult to incorporate that into Linux?

  4. $spacer_open
    $spacer_close

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •