GNU Parallel: Difference between revisions
Created page with "GNU parallel is useful for running multiple processes over an input list, similar to xargs.<br> ==Usage==" |
No edit summary |
||
Line 2: | Line 2: | ||
==Usage== | ==Usage== | ||
[https://www.gnu.org/software/parallel/parallel_tutorial.html parallel tutorial] | |||
==Replacement strings== | |||
Parallel includes a handful of default replacement strings: | |||
<pre> | |||
--rpl '{} ' | |||
--rpl '{#} $_=$job->seq()' | |||
--rpl '{%} $_=$job->slot()' | |||
--rpl '{/} s:.*/::' | |||
--rpl '{//} $Global::use{"File::Basename"} ||= | |||
eval "use File::Basename; 1;"; $_ = dirname($_);' | |||
--rpl '{/.} s:.*/::; s:\.[^/.]+$::;' | |||
--rpl '{.} s:\.[^/.]+$::' | |||
</pre> | |||
;Parent dirname | |||
<code>--rpl '{//} s:.*/(.*)/[^/]*:\1:;'</code> |
Revision as of 15:39, 14 November 2022
GNU parallel is useful for running multiple processes over an input list, similar to xargs.
Usage
Replacement strings
Parallel includes a handful of default replacement strings:
--rpl '{} ' --rpl '{#} $_=$job->seq()' --rpl '{%} $_=$job->slot()' --rpl '{/} s:.*/::' --rpl '{//} $Global::use{"File::Basename"} ||= eval "use File::Basename; 1;"; $_ = dirname($_);' --rpl '{/.} s:.*/::; s:\.[^/.]+$::;' --rpl '{.} s:\.[^/.]+$::'
- Parent dirname
--rpl '{//} s:.*/(.*)/[^/]*:\1:;'