Next Trivial Utilities 161

runN

        my %pid;
        while (@ARGV) {
          if (keys(%pid) < $opt{n}) {
            $pid{spawn(@cmd, shift @ARGV)} = 1;
          } else {
            delete $pid{wait()};
          }
        }
        1 while wait() >= 0;


Next Menu Copyright © 2012 M. J. Dominus