[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: which is the best command to use

于 2012-1-4 19:26, Wilko Fokken 写道:
On Tue, Dec 27, 2011 at 08:57:55PM +0800, lina wrote:

I have two questions, wish to get advice,

Question 1:

For a series of files:

cat  a_*.o* | grep "WARNING"

some file like a_1.o12 has WARNING, but others does not have WARNING

How can I let grep returns the filename?

try "grep -H"
in order to get the filename.

Maybe you can try
$ grep -lR "WARNING" /pathname

Reply to: