LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   grep a phrase (https://www.linuxquestions.org/questions/linux-general-1/grep-a-phrase-166077/)

degraffenried13 04-04-2004 11:01 AM

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?

hw-tph 04-04-2004 11:10 AM

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


All times are GMT -5. The time now is 12:15 PM.