I need a script that will run a series of tail -f commands and output them to a file. I need tail -f run a certain amount of time for grep specific words. The reason is that this is a specific time, because some of these values ββare not immediately displayed, as this is a live log.
How can I run something like this to say 20 seconds, output the grep command, and then move on to the next command?
tail -f /example/logs/auditlog | grep test
thanks
source share