| titaniumdecoy |
Jul 14th, 2006 7:10 PM |
Tailing a file?
There is a program I am working with that, attached to an external instrument, writes cryptic data to file for a few days. This data file is then run through another program which extracts the numeric data and writes it to an Excel file. If the numbers in this file are all within a certain range, the external instrument passed the test.
While the program is generating the data file (which takes a long, long time), I need to read the data that is being produced and stop the test if it has failed. What is the "safest" way to do this? I am on a Windows machine, so I assume there is no "tail" command. Is there a way to "stream" the data through my script as it is written to the file, or would it be better to read the file at regular intervals? If this is the case, how can I read the file without interrupting the program that is writing it?
|