(imported comment written by NoahSalzman)
With problems like these it is easier if you “build them up” one step at a time. Here is how I thought through it. I created a test file that looked like this:
Q: lines of file “/Users/noah/foobar.txt”
A: “06/03/2011 14:38:31.671”,“0”
A: “06/03/2011 14:38:31.671”,“0”
A: “06/03/2011 14:38:31.671”,“0”
A: “06/03/2011 14:38:31.671”,“0”
A: “06/03/2011 14:38:31.671”,“0”
A: “06/03/2011 14:38:31.671”,“0”
A: “06/03/2011 14:38:31.671”,“0”
A: “06/03/2011 14:38:31.671”,“0”
A: “06/03/2011 14:38:31.671”,“0”
A: “06/03/2011 14:38:36.671”,“0”
A: “06/03/2011 14:38:41.671”,“0”
A: “06/03/2011 14:38:46.671”,“2”
A: “06/03/2011 14:38:51.671”,“0”
A: “06/03/2011 14:38:56.671”,“0”
A: “06/03/2011 14:39:01.671”,“0”
A: “06/03/2011 14:39:51.671”,“0”
A: “06/03/2011 14:39:56.671”,“0”
A: “06/03/2011 14:40:01.671”,“0”
Then I started parsing it apart:
Q: following texts of lasts “,” of lines of file “/Users/noah/foobar.txt”
A: “0”
A: “0”
A: “0”
A: “0”
A: “0”
A: “0”
A: “0”
A: “0”
A: “0”
A: “0”
A: “0”
A: “2”
A: “0”
A: “0”
A: “0”
A: “0”
A: “0”
A: “0”
Q: substrings separated by “%22” of following texts of lasts “,” of lines of file “/Users/noah/foobar.txt”
A:
answer omitted for space
Q: concatenation “” of substrings separated by “%22” of following texts of lasts “,” of lines of file “/Users/noah/foobar.txt”
A: 000000000002000000
Q: last 10 of concatenation “” of substrings separated by “%22” of following texts of lasts “,” of lines of file “/Users/noah/foobar.txt”
A: 0002000000
Q: (last 10 of concatenation “” of substrings separated by “%22” of following texts of lasts “,” of lines of file “/Users/noah/foobar.txt”) as integer
A: 2000000
Q: ((last 10 of concatenation “” of substrings separated by “%22” of following texts of lasts “,” of lines of file “/Users/noah/foobar.txt”) as integer) > 0
A: True
You, of course, are looking for “False”. You can set it up this way if you want:
Q: if (((last 10 of concatenation “” of substrings separated by “%22” of following texts of lasts “,” of lines of file “/Users/noah/foobar.txt”) as integer) > 0) then “do one thing” else “do another”
A: do one thing
This way of doing it assumes you will always have integers in that last column. If there is the possibility of having alphas then you can do something like comparing your result to the string “0000000000”.
Lastly, if this is a really big file you may want to pull out the last ten lines previous to all the other text parsing.