Skip to content

Instantly share code, notes, and snippets.

@alecchen
Created January 19, 2010 02:59
Show Gist options
  • Save alecchen/280617 to your computer and use it in GitHub Desktop.
Save alecchen/280617 to your computer and use it in GitHub Desktop.
#!/usr/bin/env perl
use strict;
use warnings;
my $log = $ARGV[0] || 'log.txt';
while (1) {
my $line_number = (split q{ }, `wc -l $log`)[0];
my $tail = `tail $log`;
print "$line_number\n$tail\n";
sleep 10;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment