Skip to content

Instantly share code, notes, and snippets.

@shoorick shoorick/wcloop
Created Nov 18, 2014

What would you like to do?
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;

This comment has been minimized.

Copy link
Owner Author

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
You can’t perform that action at this time.