LinuxQuestions.org
Help answer threads with 0 replies.
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
 
Search this Thread
Old 04-04-2004, 12:01 PM   #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, 12:10 PM   #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


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


All times are GMT -5. The time now is 08:55 AM.

Main Menu
Advertisement
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