Need in for a script that should check for errors in multiple log file (approx 2500) and should mail

hello everyone,

I am new to linux and got this deliverable to write a script that should check for error in multiple log file (count is approx 2500 log files on single server) and once error is found, it should mail that error

My logic says:
we can put all log files path/location in one FILE and we can implement for loop to read single file from FILE and search for error and if error is found , will append in different output file and iterating for loop to read every log file in FILE and once all files are searched, then mailx output file

Could you please help me in implementing above idea or if you have any convenient way, please share.

Looking for help from scriptors

Thanks in advance.

Knowing how your log file are named and where they are located might provide a better means of getting a list of files to process than manually creating a file containing 2500 pathnames).

Knowing what operating system and shell you're using might help us determine whether or not the operating system you're using has tools to perform these kinds of specialized searches built-in.

Knowing the format of your log files and how you are able to determine whether or not they contain indications that an error occurred will be crucial to determine what kind of processing needs to be performed to achieve your goal.

Samples of log files and the output you hope to produce from those samples would be a huge help if you want suggestions on how to process your log files.

Without basic information like those things listed above, we can make lots of wild guesses that might not be of any help at all.

Is that a homework question? Those should be posted in Homework & Coursework Questions filling in the correct form to its entirety according to the forum rules.

If this is not a homework assignment, please explain the company or project you work for and the nature of the problem you are working on.

In either case, please show us what you have tried so far to solve this problem on your own, using (CODE) tags where applicable.