2

I would like the timing pause to be replaced with the equivalent of a getchar() in a GNU parallel execution:

parallel -j2 --halt 2 ::: 'sleep 5m; return 1' './runMe'

However the following does not work (it finishes the execution of the first job immediately):

parallel -j2 --halt 2 ::: 'read -n1 kbd; return 1' '/runMe'

Is there another way than just waiting? NB: ./runMe contains an infinite loop.

1
  • 1
    parallel -p ...
    – Ole Tange
    Commented Sep 4, 2017 at 17:13

1 Answer 1

0

GNU Parallel can run interactively using -p.

parallel -p echo ::: 1 2 3

You will have to answer y every time, but maybe that is good enough.

Also be aware that any output will be delayed. When running 3 jobs in parallel, the output of job 1 will be printed after starting job 3.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .