grepping for a sentence | Unix Linux Forums | UNIX for Dummies Questions & Answers

  Go Back    


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 !!

grepping for a sentence

UNIX for Dummies Questions & Answers


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 04-10-2003
eloquent99 eloquent99 is offline
Registered User
 
Join Date: Jun 2002
Last Activity: 20 February 2004, 11:20 AM EST
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
grepping for a sentence

Can you grep for a sentence. I have to search logs everyday at work and I was wondering if I could search for a string of words instead of just one.

for example, if I had to find this sentence:

"Received HTTP message type"

How would I grep it
Sponsored Links
    #2  
Old 04-10-2003
oombera's Avatar
oombera oombera is offline Forum Advisor  
Registered User
 
Join Date: Aug 2002
Last Activity: 3 October 2004, 6:07 PM EDT
Location: Cleveland, OH
Posts: 804
Thanks: 0
Thanked 5 Times in 4 Posts
Just surround the words in quotes the way you have them:

grep "Received HTTP message type" someLog
Sponsored Links
    #3  
Old 04-23-2003
kapilv kapilv is offline
Registered User
 
Join Date: Nov 2000
Last Activity: 24 April 2003, 2:24 PM EDT
Location: India
Posts: 83
Thanks: 0
Thanked 0 Times in 0 Posts
Well man grep could also have help you with other options of grep command
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
[grep] how to grep a sentence which has quotation marks "sentence" ciro314 Shell Programming and Scripting 2 11-25-2010 06:50 AM
want to pass sentence with SED and CAT patilrakesh1984 Shell Programming and Scripting 1 03-22-2010 02:55 PM
Script to ask for a sentence and then count number of spaces in the sentence charlie101208 UNIX for Dummies Questions & Answers 12 12-22-2009 02:34 AM
How to split a sentence Kattoor Shell Programming and Scripting 14 04-27-2009 12:46 PM
paste a sentence gilead29 UNIX for Dummies Questions & Answers 3 02-26-2004 08:09 AM



All times are GMT -4. The time now is 06:05 AM.