-   Linux - Software (
-   -   bash: how to edit cat <filename> | grep <keyword> feature? (

sirpelidor 06-20-2005 11:47 AM

bash: how to edit cat <filename> | grep <keyword> feature?
Hi, I found myself run into this situation quite often:

looking for certain keyword in a pile of file.

e.g: cat *.(file extension) | grep <keyword>

problem is, the result doesn't tell me which file(s) has the keyword i'm looking for. rather it shows a list of lines with the keyword.

where can I edit, so when i issue cat *.xxx | grep yyy would shows me which xxx that yyy is located?

thank you :)

Nobber 06-20-2005 12:02 PM


grep <keyword> *.(file extension)

sirpelidor 06-20-2005 03:00 PM

cool, that does the trick, thanks Nobber

All times are GMT -5. The time now is 04:11 AM.