-
:::: feed the given list, space separated. -
::::: read inside file, line separated.
parallel echo ::: /*Will echo /bin, /boot, /cdrom, /dev, /etc …
| command | output |
|---|---|
|
|
|
|
|
|
|
|
|
|
see a bash script
| pattern | comment |
|---|---|
|
full path : mydir/mysubdir/myfile.myext |
|
remove extension : mydir/mysubdir/myfile |
|
filename: myfile.myext |
|
dirname: mydir/mysubdir |
|
basename: myfile |
|
job number in the sequence |
|
job slot number (thread id) |
|
Nth parameter (can be -N from the end) |
|
|
|
remove 2 or 3 file extensions |
|
total number of jobs: |
|
opposite of |
|
Default value is string if the argument is empty. |
|
If the argument starts/ends with string, remove it. |
|
Substring from N (and length L). |
TODO| option | meaning |
|---|---|
|
Number of simultaneous jobs. |
|
Shuffle job order |
|
ask the user if a command should be run using |
|
Progress information |
|
stopping jobs taking more than X seconds (can also be |
|
will make sure there is at least X seconds between each |
|
A terminal for every job |
|
With a log file X, jobs can be stopped and later pickup where it left off. |
|
Stop pruning (or kill) jobs if one of the jobs fails |
|
run the jobs with a nice value X. |
parellel -k --lb do_something ::: task_1 task_2 task_3 # immediately display job stderr/stdout one-at-a-time by jobs order
parallel --arg-sep ,, echo ,, A B C :::: def-file # change ::: to ,,
parallel --arg-file-sep // echo ::: A B C // def-file # change :::: to //
parallel -d _ echo :::: abc_-file # parse '_' separated instead lines
parallel -q echo "\"{}\"" ::: a b c # "a" "b" "c"wget https://mirror.cyberbits.eu/gnu/parallel/parallel-latest.tar.bz2
# or from this repo
wget https://github.com/jujumo/memento/raw/main/coding/linux/parallel-latest.tar.bz2
tar -xjf parallel-latest.tar.bz2
cd parallel-20240222/
./configure
make
sudo make install
parallel --citationOn Synology NAS, the opkg perl package may lead to following error:
$> parallel
Can't locate IPC/Open3.pm in @INC (you may need to install the IPC::Open3 module) (@INC contains: /opt/lib/perl5/5.28) at
...$> sudo opkg remove perl
$> sudo -i
$> curl -fsSL https://git.io/perl-install | bash -s ~/perlThis is not available for arm32.