I have the one below, but need to retrieve the lines with specific word…
I dont need the whole information on the file just the last 50 lines, but with specific word.
items 1 of ( item 1 of it, (lines of item 0 of it) ) whose ( (line number of item 1 of it) > ( item 0 of it - 50 /* ← This is the number of lines to return, which is subtracted from the total # of lines ← */ ) ) of (it, number of lines of it ) of files “C:\Windows\SysWOW64\rserver30\Radm_log.htm”
This could mean two different things, I want to be sure I’m understanding correctly.
The lines that contain “some word”, only among the last fifty lines of the file?
The last fifty lines containing “some word”, wherever those lines are in the file?
i.e. in a 100-line file with two instances of the word, on the first line and on the last line, the first approach would only return the last line of the file; since the search is filtered to the last fifty lines of the file, the instance on line 1 would be excluded.
In the same 100-line file, the second approach would return both lines.
Your best bet would be to run an Action to use shell commands to filter the file into a new file containing only the lines of interest, and then use Relevance to read the last fifty lines from the file.
In Relevance we could read the last fifty lines and then filter to those containing the word, but we don’t have a good way to find all lines containing the word and then filter to the last fifty results (we don’t have indexes or ordering of the plural results).