3c3,7 < # parallel PARALLELISM CMD ARGS... --- > # parallel.pl by Bryan Dongray, btd@dongrays.com > # available at http://www.norbry.net/tools/ > # small modifications to run only on STDIN by Dale W. Carder, dwcarder@doit.wisc.edu > > # parallel PARALLELISM CMDS... 19c23 < if ($#ARGV < 1) { --- > if ($#ARGV < 0) { 22c26 < print STDERR "Usage: $prog [-v] ...\n"; --- > print STDERR "Usage: $prog [-v] CMDS...\n"; 24,25c28 < print STDERR "Hint: one line of stdin as last arg to cmd\n"; < print STDERR "Warning: $prog 0 CMD - can flood a system\n"; --- > print STDERR "Reads commands to run via STDIN\n"; 34a38,44 > > if ($parallelism < 1 ) { > print STDERR "$prog: $parallelism < 1\n"; > goto errusage; > } > > 114c124 < local ($lastarg, $newpid, @cmd); --- > local ($lastarg, $newpid); 148,151d157 < # set CMD to run < @cmd = @ARGV; < push(@cmd, $lastarg); < 155,156c161,162 < exec @cmd; < print STDERR "$prog: exec error:", join(" ", @cmd), "\nperror: ", $!, "\n"; --- > exec $lastarg; > print STDERR "$prog: exec error:", join(" ", $lastarg), "\nperror: ", $!, "\n";