4 die "usage master counter command comandargs ... \n";
7 $count = $ARGV[0]; shift @ARGV;
13 for($i = 0; $i < $count; $i ++) {
14 @c = (@command, "$file.$i");
15 warn "Start process: $i @c\n" if $debug;
16 open("OUT$i", "| @c") || die "open @c\n";
17 select("OUT$i"); $| = 1;
23 $o = 'OUT' . ($n % $count);
25 warn "$o $_" if $debug;
29 for($i = 0; $i < $count; $i ++) {
30 warn "Close process $i\n" if $debug;
31 close("OUT$i") || warn "close OUT$i: $!\n";