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 > 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-06-2008 02:45 AM
how to exclude the GREP command from GREP yamsin789 UNIX for Advanced & Expert Users 2 10-05-2007 02:59 AM
grep command help ishmael^soyuz Shell Programming and Scripting 4 07-11-2007 09:01 AM
grep command pmsuper UNIX for Dummies Questions & Answers 6 11-22-2006 07:12 AM
grep command debasis.mishra Shell Programming and Scripting 1 03-28-2006 01:53 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-01-2007
eerener eerener is offline
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*
  #2 (permalink)  
Old 10-01-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
if you have access to a UNIX system, type:
Code:
man grep
  #3 (permalink)  
Old 10-02-2007
JayC89 JayC89 is offline
Registered User
  
 

Join Date: Oct 2007
Posts: 50
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.
  #4 (permalink)  
Old 10-02-2007
matrixmadhan matrixmadhan is offline Forum Advisor  
Technorati Master
  
 

Join Date: Mar 2005
Location: leaf node in B+ tree
Posts: 2,932
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 ?
  #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" *
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 10:24 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0