I need to ensure that a certain line appears in the active log file, which means that the operation is active (submitting this account to the trigger).
Given that I will do this remotely, I cannot go with the 'tail -f filename', otherwise it will follow the file indefinitely, so I think about grabbing a bunch of the last lines written and counting them as
tail -n8 /var/log/service/service_V138/operations.log| grep \|DONE\| | wc -l
Is there a better way?
source share