Created
November 18, 2014 10:31
-
-
Save shoorick/7d5f97e866ab5af498ae to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Use
watch
instead of this script:watch -n 1 wc -l some.txt