Ah, I see. You can't run this race, because you have to get to the starting point of it first, and you don't know where that is. Well, that's a bit of a problem.
What's a shell script? Da stellen wir uns mal ganz dumm ... (old German joke from a classic movie, a physics teacher explaining how a steam engine works, and he starts with "lets pretend we're really stupid ..." to the class, and then demonstrates that he knows nothing, but is friendly and funny). Any command you issue from the shell is a part of a shell script.
Like: "fgrep ECC /var/log/messages". Good. Useful. Might not work (I can't remember whether ECC is in upper or lower case). So tune and tweak it by trial and error. Now, we need to get this recorded in a mail: "fgrep -i ecc /var/log/messages | mail -s "ECC error report" root". You're done (but better read some man pages to figure out why I added -i and -s to the commands). There's your very first version. Learn how to put a header line on this (search the web for shebang line), copy it into /usr/local/sbin/diversity_ecc_monitor_v0, and edit /etc/crontab to run it once a day.
EDIT: I forgot to tell you that when you save the command in a script, you'll have to do "chmod a+x" on it. You would have figured that out sooner or later, but it would be frustrating.
Now, is this a GOOD and COMFORTABLE solution? Hell no. To begin with, the message should have time and date in the subject line. Next, if there is no output, you shouldn't get an empty message. By the way, the script needs error handling: mail might fail, fgrep might fail, and so on. Don't wait for it to fail, rather think through "what could possibly go wrong". Even better: You should only get a message when the situation changes (if one ECC error happens Monday, getting an e-mail Monday night is reasonable, getting a second one Tuesday night is not). All that can be done easily ... except for a beginner, the easy things are hard and frustrating. Just keep working at it.
Also, go get a book about simple shell script programming. Honestly, I don't have a recommendation, having learned shell scripts by trial and error about 30 years ago (on Unix, on other machines considerably before that). Personally, if it weren't for Covid, I would say go to the programming section of your local library, and pick whatever shell script book they have.
Is this enough for a starting point?