Hi all,
I've got an app which keeps logging and the logs keep rotating every minute.Theres a particular string in these logs that I'm interested in and wish to capture all lines that contain the string.Any ideas?
log file could be
smap.log
string is 'RSS 1'
so I do a
#pgrep "RSS 1" smap.log >> ub.log
so this would pipe all lines containg the 'RSS 1' string to ub.log.But the app keeps logging & logs would now rotate and how would i be able to pipe the next lines containg the string to ub.log.It needs to be appended and not replace the existing entries in ub.log....
If any one could help me with a script that could do the job???
Cheers
Davis