Write ~/check-log.sh. It takes one argument, a log file.
- If the log has an
ERRORline, writeproblems in FILEand end with exit code 1. - Else, write
FILE is clean.
Use $1 for the file, and grep -q in the if.
Write the script
~/check-log.sh has the shebang, an if with grep -q and $1, an else, a fi, and the owner can run it.