LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 04-04-2004, 11:01 AM   #1
degraffenried13
Member
 
Registered: Sep 2003
Posts: 228

Rep: Reputation: 30
grep a phrase


I have been reading about grep, egrep and fgrep, and I can't seem to figure out how to get grep to search for a whole phrase ie(media tray) instead of just media and tray seperately. Anyone help?
 
Old 04-04-2004, 11:10 AM   #2
hw-tph
Senior Member
 
Registered: Sep 2003
Location: Sweden
Distribution: Debian
Posts: 3,032

Rep: Reputation: 57
Try grep "media tray" filename. You can use the -Hn switches to grep to make it display filename and line number if you're grepping through several files.


Håkan
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Start apache with the pass phrase DropHit Linux - Software 7 02-12-2010 03:36 PM
Which command to search text/phrase in file? b:z Linux - General 2 03-30-2005 09:11 PM
Search all man pages for a phrase suguru Linux - Software 1 09-12-2004 06:38 AM
pass phrase from disk in ppdd shashi_lq Linux - Security 1 04-18-2004 05:52 AM
grep [exact phrase] chrisfirestar Linux - General 2 02-09-2004 04:30 AM


All times are GMT -5. The time now is 11:18 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration