Search a String and send mail if found in Shell Script

525 Views Asked by At

I have to serch for an error like " Socket not open" in a log file named q2.log
and I have to send a mail if i find the string.
This process should happen at regular time intervel that i can schedule a chronjob,
But problem is for my first job lets assume I read 1 to 1000 lines For next time I have to search from 1000 to remaining .How can i achieve it
Thanks in advance

0

There are 0 best solutions below