#!/usr/bin/perl -w

use warnings;
use strict;
use Getopt::Long;

my $server = undef;
GetOptions ("server|s=s" => \$server);

my @cmdOut = `echo "status;quit" | pantasks_client -c ~ipp/$server/ptolemy.rc 2>&1`;
my $line;
my $passedHeader=0;
foreach $line (@cmdOut) {

    chomp($line);
    if ($line =~ m/.*Task Status.*/) {$passedHeader=1;next;}
    if ($passedHeader){print "$line<br>";}
}
