Count lines in files minus 1?

Hi All,

Have a log file with headers and would like to create an analysis to count the how many lines are in the log file after the headers. How would I go about instructing Bigfix to count all lines of a file except for the first one?

chop this up

https://bigfix.me/relevance/details/3002320

q: number of lines of it of file "c:\temp\test.txt"
A: 17

q: ((number of lines of it) of file "c:\temp\test.txt") -1
A: 16
1 Like

Had no idea you could do direct arithmetic in this way. Today I learned… Thanks again dakota.

Pertinent bit of info I left out is that all endpoints in scope will have this log file, however only those with something to find will actually have any data in them. So using the “-1” will actually return those with no entries with a value of -1 instead of 0.

Thanks mel01, used your link to look at the contents of the first line. Seems to be working a treat.