3 ms·
For use within scripts, I think it's a much easier matter to determine that parallel is on $PATH than to try to do feature detection on xargs. Granted, it's alw
by cstrahan 10y ago
For use within scripts, I think it's a much easier matter to determine that parallel is on $PATH than to try to do feature detection on xargs. Granted, it's always possible that the parallel on $PATH might not be the one you're thinking of, but... Whatevs.
- ole_tange 10y ago> Granted, it's always possible that the parallel on $PATH might not be the one you're thinking of, but... Whatevs. For exactly this reason, GNU Parallel has the option --minversion. So in your script you put: parallel --minversion 20140722 || exit if the rest of your script depends on functionality only present from version 20140722. If the parallel in the $PATH is not GNU Parallel it will fail (and thus exit). If it _is_ GNU Parallel it will fail if the version is < 20140722 and succeed otherwise.