Help needed...
Can you tell me how to compare the last two couple entries in a file and print their result in new file..
I have one file
Check1.txt
\abc1 12345
\abc2 12327
\abc1 12345
\abc2 12330
I want to compare the entries in Check1 and write to another file :
check2.txt :
<current _date & time >
\abc1 <blank since there is no change>
\abc2 3 (This is obtained by subtracting 12330 - 12327)
The check1.txt will be appended by new entries at every hour. Again the difference between the new entry and the entry just above must be compared as in previous case.
i.e. I need to check the difference for every last 2 couple entries only....
Please help me regarding the same....