#!/afs/athena/contrib/perl/perl

require 'open3.pl';

&open3('MRIN','MROUT','','mrtest');

print "Start:\n";

print MRIN "connect\nauth\n";

while(<>) {
    ($list, $num) = split;

    print MRIN <<EOQ;
qy ulis $list sipb-spare-$num 1 0 0 0 0 -1 LIST sipb-spare-acl "Spare group $num"
qy amtl sipb-spare-$num LIST sipb-spare-acl
EOQ
    ;

    print scalar(<MROUT>),scalar(<MROUT>);
}
