Is there a cheap way to monitor a log file like tail -f log.txt, then if something like [error] appears, execute a command?
tail -f log.txt
[error]
Thank you.