my $cmd = sprintf('/usr/bin/uustat -s %s %s', $host,
$hours ? '-o ' . $hours : '');
- open my $prg, '|-', $cmd || return;
+ open my $prg, '-|', $cmd || return;
my @list;
while (<$prg>) {
push @list, $_;
}
if (scalar @$oldlist > 0) {
- printf "UUCP WARNING - %s: %d jobs older than %d hours\n", $host, scalar @$list, scalar @$list, $config->{crit_hours};
+ printf "UUCP WARNING - %s: %d jobs older than %d hours\n", $host, scalar @$list, $config->{crit_hours};
exit $ERRORS{WARNING};
}