Random Project

–line number of last lines to check. Default: entire file

–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