backscratcher

 

replay

Page history last edited by tbarron 1 yr ago

replay

 


#!/usr/bin/perl
# ========================================================================
# replay
#
# @(#) xxx
#
# Syntax:
#   
#   
# History:
#  97-03-08    tb    created
#
# Notes:
#
# ========================================================================
use Getopt::Long;

$interval = 10;
GetOptions("-c!" => $change,
           "-i=i" => $interval);

$cmd = join( " ", @ARGV );
while (1)
{
   open(STUFF, "$cmd |");
   @stuff = <STUFF>;
   close(STUFF);
   $stuff = join(" ", @stuff);

   if ($change)
   {
      if ($stuff ne $oldstuff)
      {
         system( "clear" );
         print( "$cmdn" );
         print( "$stuffn");
         $oldstuff = $stuff;
      }
      sleep(1)
   }
   else
   {
      system( "clear" );
      print( "$cmdn" );
      print( "$stuffn");
      sleep( $interval );
   }
}

Comments (0)

You don't have permission to comment on this page.