3

I am interested in running a script in parallel and I've started looking over GNU parallel tool, however I'm having a bit of trouble. My script doSomething takes 3 arguments and I would like to run the script in parallel on different values for the arguments. How can I do this?

I've tried: parallel ./doSomething {1} {2} {3} ::: {0..5} ::: {0..5} ::: {0..5} but it just seems to hang.

Any help would be greatly appreciated, thanks!

1
  • Are you using any version of GNU parallel packaged with Debian or with Ubuntu? If yes, try to use the --gnu option (or, conversely, try to use the --tollef option). Commented Mar 10, 2013 at 0:24

1 Answer 1

1

Please try:

parallel --gnu echo ./doSomething {1} {2} {3} ::: {0..5} ::: {0..5} ::: {0..5}

If that works as expected, then your command is blocking because ./doSomething behaves differently when called from GNU Parallel than when it is called directly. One of the reasons why that may happen is if ./doSomething depends on having an tty connected.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.