Next Welcome to my ~/bin 31

ftail

        while (1) {
          my ($dev, $ino) = stat $file;
          if (defined $dev && "$dev,$ino" ne $devino) {
            while (read F, my($buf), 8192) {
              print $buf;
            }
            open F, "<", $file or die "Couldn't open file $file: $!; aborting";
            $devino = "$dev,$ino";
            seek F, 0, 2 if $END;
            $END=0;
          }
          while (read F, my($buf), 8192) {
            print $buf;
          }
          sleep 1;
          seek F, 0, 1;
        }


Next Menu Copyright © 2005 M. J. Dominus