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 the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #5 (permalink)  
Old 10-03-2007
Yogesh Sawant's Avatar
Yogesh Sawant Yogesh Sawant is offline Forum Staff  
Part Time Moderator and Full Time Dad
  
 

Join Date: Sep 2006
Location: Rossem, Tazenda
Posts: 1,086
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" *