I have a a few log files in a directory. Each of these log files have
status messages of the system.
Eg:
2007-06-07 14:30 Critical
2007-06-07 14:40 Error
What I need to do is list all the files in the directory which have
critical messages in the recent 10 lines. So I have to read 10 lines
of each of the file, look for the first instance of 'Critical' in it
and list is the file name there. Can anybody here give me some
pointers on how to go about it.
thanks,
Anush
status messages of the system.
Eg:
2007-06-07 14:30 Critical
2007-06-07 14:40 Error
What I need to do is list all the files in the directory which have
critical messages in the recent 10 lines. So I have to read 10 lines
of each of the file, look for the first instance of 'Critical' in it
and list is the file name there. Can anybody here give me some
pointers on how to go about it.
thanks,
Anush
Comment