Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
#!/usr/bin/perl
print STDERR "Press ^C to exit\n";
my $cmd_line = 'wc ' . join ' ', @ARGV;
my $out;
while (1) {
$out = `$cmd_line`;
chomp $out;
print "\cM$out";
sleep 1;
}
Owner

shoorick commented Nov 18, 2014

Use watch instead of this script:
watch -n 1 wc -l some.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment