http://qs321.pair.com?node_id=297862


in reply to Tk tail -f - How?

This one-liner will (roughtly) tail --follow a file on Win32. It always starts at the beginning, so its more of a head --follow, but that could be worked around fairly easily.

perl -e"open F, '<', $ARGV[0] or die $!; while( 1 ){ print <F>; Win32: +:Sleep 1 }" log

Currently it just outputs to the console, but you can do the Tk; bit...it might get a bit more than one line then:)

Obviously, as is you have to ^C to stop it, but with the Tk; event model, you can probably control that easily.


Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail