Front page | perl.beginners |
Postings from April 2002
Re: Better "tail -f"
Thread Previous
|
Thread Next
From:
drieux
Date:
April 2, 2002 07:23
Subject:
Re: Better "tail -f"
Message ID:
843CDE9C-464D-11D6-9A04-0030654D3CAE@wetware.com
On Tuesday, April 2, 2002, at 07:04 , Nikola Janceski wrote:
> open(TAIL, "tail -f $filename |") or die "no tail $! $?\n";
> while(<TAIL>){
print $_;
> }
> close TAIL;
first off it doesn't seem to work - it is just siting there.
The problem being that 'tail' is looking at the old inode
before the exterior process re-wrote the file
try it at the command line
in window a in window b
tail -f file ./p2 > file
./p2 >file
You need to go 're-seek' the file....
ciao
drieux
---
Thread Previous
|
Thread Next