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

Re: which is the best command to use



On Tuesday 27,December,2011 09:19 PM, Andrei Popescu wrote:
On Ma, 27 dec 11, 20:57:55, lina wrote:
Hi,

I have two questions, wish to get advice,

Question 1:

For a series of files:

cat  a_*.o* | grep "WARNING"
Useless use of 'cat' (grep can open files)

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

How can I let grep returns the filename?
 From your explanation it's not clear to me if you want -l or -H, but you
might just read 'man grep' and decide for yourself ;)

Not familiar with xargs, but you should probably read that manpage too.

To answer the question in your subject I think the correct command to
use is 'man' :)

Kind regards,
Andrei
I didn't realize I could find answer from manuals of grep.

Thanks,


Reply to: