分类:
2007-03-15 18:32:07
#!/usr/bin/perl
use warnings;
my @OLD = `crs_stat -t`;
my $check = join('', @OLD);
if($check =~ /^$/)
{
exit;
}
else
{
`clear`;
print @OLD;
}
while(1)
{
system("clear");
@NEW = `crs_stat -t`;
$line_count = 0;
for($line_count = 0; $line_count <= $#NEW; $line_count ++)
{
if($OLD[$line_count] eq $NEW[$line_count])
{
print $OLD[$line_count];
}
else
{
print "\33[32m$NEW[$line_count]\33[0m";
$OLD[$line_count] = $NEW[$line_count];
}
}
sleep(3);