The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM



Thread: grep command
View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #5 (permalink)  
Old 10-03-2007
Yogesh Sawant Yogesh Sawant is offline
Part Time Moderator and Full Time Dad
 

Join Date: Sep 2006
Location: Rossem, Tazenda
Posts: 758
Quote:
Originally Posted by JayC89 View Post
Grep is basically a search command.

It has many different uses, below are the ones I'm aware of;

Code:
grep -i *whatever your searching for *
This will search all files in the directory you are currently in for "whatever your searching for" Making sure the * are kept in place.
See what this command results in:
Code:
[ysawant@sms104a smsc]$ grep -i *whatever your searching for *
grep: your: No such file or directory
grep: searching: No such file or directory
grep: for: No such file or directory
[ysawant@sms104a smsc]$
This command should be:
Code:
grep -i "*whatever your searching for" *
Reply With Quote