Help w/ script to read file and parse log message

Hi,

I am working on the script to parsing the specific message like "aaaa" in multiple log files like N1-***,N2-***,N3-***...
The script is to find the list of lof files which contains the message "aaaa" and export the list into excel filE.

Can anyone give help?

Thanks

If you trying to find list of the log files which contains the string "aaaa" then you can use the command like

$ grep -il aaaa N*.* or

$grep -il aaaa N*.txt (or N*.log, what ever is the extecnsion of the files)

once you find the list of the files you can redirect the output into

$grep -il aaaa N*.txt > my_file

Thank you.

One more question:

if the command found the string "aaa" in N1.log, N2.log, N4.log
how can I redirect these information N1, N2, N4 into a excel file?