in reply to Read Last Line of A File Only
#!/usr/bin/perl -w use strict; while( 1 ) { my $file = shift || last; open TAIL, "tail -1 $file|" or die "can't do tail -1 $file:$!\ +n"; my $line = <TAIL>; print $line; close TAIL; }
| Plankton: 1% Evil, 99% Hot Gas. |
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Read Last Line of A File Only
by Aristotle (Chancellor) on Aug 23, 2004 at 20:22 UTC | |
by bronto (Priest) on Aug 24, 2004 at 10:20 UTC | |
by Aristotle (Chancellor) on Aug 24, 2004 at 11:04 UTC |