Reading a file as it fills up by another program
Reading a file as it fills up by another program
- Subject: Reading a file as it fills up by another program
- From: Harald E Brandt <email@hidden>
- Date: Thu, 11 Dec 2003 16:47:26 +0100
How to read a file, record by record, as the file is being filled up
by another process? The process that is writing to the file is a
"regular" unix background process whose stdout and stderr is
redirected to the file - no special locking procedures.
I can't get to grips with that, neither from AppleScript, nor from Perl.
If using 'open for access', EOF will retain its value of 0 until the
file is closed, so it won't read the file as it fills up. Is it
possible at all to use the standard 'read' to do that?
Neither will repeatedly closing the file to reopen it, in a loop, get
anything until the writing process has actually closed the file.
Same thing happens using Perl!
There's got to be some method (it's even suggested in TN2065,
although not how to achieve that):
--heb
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.