Created 03-29-2022 12:34 PM
Hi,
An external process creates an error.file on certain events and updates the process log file.
The process that I'm creating starts when the error.file is created and need to read the last 10 - 15 lines of the log.file. My problem is that the log.file does not rollover and just grows continually and neither follows a log standard in order to use SysLog processors.
How can I get that last 10 - 15 lines of the log file? Something like ( "tail -15 log.file" ).
Thanks in advance.
Created 03-29-2022 03:54 PM
Hi @templarian ,
You can use something like the example below:
Cheers,
André
Created 03-29-2022 03:54 PM
Hi @templarian ,
You can use something like the example below:
Cheers,
André
Created 03-31-2022 10:06 AM
Hi André,
That is what I needed. Thanks a lot.
For those who are facing the same problem in windows; @araujo's solution also works with Powershell