The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Operating Systems > BSD
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #4 (permalink)  
Old 02-27-2009
TonyLawrence TonyLawrence is offline
Registered User
  
 

Join Date: Sep 2007
Location: SE Mass
Posts: 147
Quote:
Originally Posted by Straitsfan View Post
Can you explain what you mean by 'delimited?'

I just copied the NeoOffice file (saved as .doc, a word format) to text edit (a .txt file) and the command worked (grep 'I am writing') but it printed the whole letter, or most of it -- which I'm guessing means that it found all the lines with any of the three words in the string and printed those lines. Is it possible to use 'grep' to find this particular sentence fragment and no other lines which don't contain this entire fragment?
Copying a .doc to something named .txt does NOT make it a text file.

I think this is the basis of your problem and misunderstanding.

Try doing a "Save As" and choose something that is Text (I don't know what Neo offers you, probably "Text", perhaps some variants).

Grep is designed to work on text files, not wordprocessor files.