I’m executing a command line from From my Powershell in the background. this command line creating a log file.
while the command line is running and the log file accordingly, I would like that my program will review the log file (which is increasing) and search for a specific word “Published” and when i “found” it starting another task in my program.
My question is, how should I do it? meaning, monitoring the log file while it’s increasing and searching for a specific string and then start a new process.
Please be aware, that the log file is accumulated - means it already contains that string from the previous execution, so i must ignore that information and take into account the new output from the current. maybe to monitor for the specific string in the last 5 lines in the log…or something like that.
Thanks in Advanced