Hi. I need to guarantee that a specific string is appearing in an active log file, meaning an operation is alive (feeding this count to a Trigger).
Considering I'll do this remotely, I can't go with 'tail -f filename' else it would follow the file indefinitely, thus I'm thinking about grabbing a bunch of last written lines and counting them as,
tail -n8 /var/log/service/service_V138/operations.log| grep \|DONE\| | wc -l
Is there any better way?