in reply to using perl to format tail -f
One way is to open 'tail -f' as a 'read-from' filehandle within your script, as documented in perlopentut.
open Tail, '/usr/bin/tail -f /my/log/file |' or die "Pipe failed: $!\n +"; while (<Tail>){ # Do stuff }
-- Human history becomes more and more a race between education and catastrophe. -- HG Wells
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: using perl to format tail -f
by MidLifeXis (Monsignor) on Apr 14, 2008 at 17:47 UTC |