File: watch-vmtouch.pl

package info (click to toggle)
vmtouch 1.3.1-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 176 kB
  • sloc: ansic: 762; makefile: 25; perl: 16; sh: 1
file content (21 lines) | stat: -rwxr-xr-x 420 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env perl

use strict;

my $path_to_vmtouch = ''; # leave empty if it is in path. otherwise it must end in /
my $frequency = 0.25; # seconds between refreshes

if (!@ARGV) {
  print "Usage: $0 <files to watch>\n";
  exit -1;
}

while(1) {
  my $out = '';
  foreach my $v (@ARGV) {
    $out .= `${path_to_vmtouch}vmtouch -v $v`;
  }
  system("clear");
  print $out;
  select(undef, undef, undef, $frequency);
}