GNU parallel: print each job to another file without pipes

This question is very close to this different one , but this answer is not valid for me, I think because of my shell the script does not work with pipes.

This is my team with several tasks:

parallel "./ClientesActivos-AP-N.sh -t 15" ::: $(seq 0 2)

I would like to output to something like:

file0.out
file1.out
file2.out

I don’t know where to put the redirector > .

I tested with no luck:

parallel ./ClientesActivos-AP-N.sh -t 15 ">" file{}.out ::: $(seq 0 1)
parallel ./ClientesActivos-AP-N.sh -t 15 ::: $(seq 0 1) ">" file{}.out

My script works as follows:

./ClientesActivos-AP-N.sh -t 15 0
./ClientesActivos-AP-N.sh -t 15 1
./ClientesActivos-AP-N.sh -t 15 2

Thus, the output will be (for the above manual non-parallel example) up to file0.out, file1.outand file2.out.

What is the correct way to redirect each job to another file?

Further unsuccessful tests:

parallel --files file{}.out "./ClientesActivos-AP-N.sh -t 15" ::: $(seq 0 2)
+1
1

, --dry-run - GNU Parallel. , , , , - "ClientesActivos" script, , ;-)

, , , , , :

$ parallel --dry-run ./ClientesActivos-AP-N.sh -t 15 {} ">" file{}.out ::: {0..1}

./ClientesActivos-AP-N.sh -t 15 0 > file0.out
./ClientesActivos-AP-N.sh -t 15 1 > file1.out
+3

Source: https://habr.com/ru/post/1530163/


All Articles