I have a file that is a list of numbers like so:
However, this was generated from a list of files so I am not sure if it contains all the numbers in sequence from start to end, inclusive (Meaning it might be "13 15" instead of "13 14 15").
My applescript checks for that, and although it seemed like it was going it be simple, my applescript fails at the number 10 and beyond, even though my dialogues say that the numbers x and y are both equal. And by fail I mean it is telling me the numbers 10 and on are missing even though it shouldnt be, because x is equal to y at that point.
Here is my applescript, and the list can be found here.
set x to 0 repeat 242 times set x to x + 1 if x is less than 10 then set x to "0" & x end if display dialog "x is set to " & x #Get's the x'th line of the file and sets it to y set y to do shell script "sed -n '" & x & "p' ~/Desktop/numlist.txt" display dialog "y result is " & y if y is not equal to x then display dialog "The number " & x & " is missing!" #exit repeat end if end repeat