The UNIX and Linux Forums  

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


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
grep command christine33990 UNIX for Dummies Questions & Answers 11 05-05-2008 11:45 PM
how to exclude the GREP command from GREP yamsin789 UNIX for Advanced & Expert Users 2 10-04-2007 11:59 PM
grep command help ishmael^soyuz Shell Programming and Scripting 4 07-11-2007 06:01 AM
grep command pmsuper UNIX for Dummies Questions & Answers 6 11-22-2006 04:12 AM
grep command debasis.mishra Shell Programming and Scripting 1 03-27-2006 10:53 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 09-30-2007
Registered User
 

Join Date: Sep 2007
Posts: 2
grep command

can you help me about followings, what they do


grep a b c

grep 'boswana.*birds' *.htm*
Reply With Quote
Forum Sponsor
  #2  
Old 09-30-2007
Yogesh Sawant's Avatar
Part Time Moderator and Full Time Dad
 

Join Date: Sep 2006
Location: Rossem, Tazenda
Posts: 790
if you have access to a UNIX system, type:
Code:
man grep
Reply With Quote
  #3  
Old 10-02-2007
Registered User
 

Join Date: Oct 2007
Posts: 47
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.

Code:
/usr/ucb/ps -auxwwww | grep *whatever*
Searches for processes running as the user you are logged on as with "whatever" in there file name\config. This can also be piped through another grep to refine the search more so.
Reply With Quote
  #4  
Old 10-02-2007
Technorati Master
 

Join Date: Mar 2005
Location: Large scale systems...
Posts: 2,609
Quote:
Originally Posted by eerener View Post
can you help me about followings, what they do


grep a b c

grep 'boswana.*birds' *.htm*
Did you give that a try first ?
Reply With Quote
  #5  
Old 10-03-2007
Yogesh Sawant's Avatar
Part Time Moderator and Full Time Dad
 

Join Date: Sep 2006
Location: Rossem, Tazenda
Posts: 790
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
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 09:35 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0