The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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 -->
  #1 (permalink)  
Old 02-27-2009
Straitsfan Straitsfan is offline
Registered User
  
 

Join Date: Feb 2009
Posts: 41
proper syntax of grep command

I'm learning UNIX on my mac (BSD), using a manual. I'm trying to figure out the grep command, and am getting something wrong. I've opened one of my files in NeoOffice and am looking for a string, the phrase 'I am writing.' I've been to some sites to get the proper syntax, and from what I can see the proper syntax is:

grep "I am writing" [file name]

A lot of times I get the message that no such file or directory exists, even when I think I've entered all the information. When that doesn't happen, the cursor just blinks, with no display of the string I'm looking for. Can someone tell me what I'm missing? Granted, the book i'm using is the OS X missing manual by david pogue, and it's only a few paragraphs on the command, so I may not be comprehending something. Please, if you could write out the proper syntax (including any slashes, dots, etc.) so I can compare it to what I'm doing.