Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
Directory
vipertje
byvipertje, January 28, 2020
--line= number of last lines to check. Default: entire file
For this function to work and have the script check the last lines of the file instead of the first lines of the file.
Replace:
for i in reversed(range(0, opts.line)):#search for pattern
With:
for i in reversed(range((len(out)-int(opts.line)), len(out))):#search for pattern
For this function to work and have the script check the last lines of the file instead of the first lines of the file.
Replace:
for i in reversed(range(0, opts.line)):#search for pattern
With:
for i in reversed(range((len(out)-int(opts.line)), len(out))):#search for pattern