I am learning linux and shell programming.
I would like to monitor a log file using tail -f
however, I would like to run this only 30mins and then send the log
file out. How can I do that?
#monitoring sys.log and write output to txt
tail -f sys.log >> sys.txt
# send it out to someuser
grep -i "string" sys.txt
I would like to put this on as a cron job, so it will execute on a
certain day for only 30mins.
Can anyone help? Thanks in advance.