-   Linux - Newbie (
-   -   GNU parallel aws cli (

aidylewis 07-17-2018 07:38 AM

GNU parallel aws cli

I have a bash script and I just need to parallelise an aws cli command with X number of jobs.

$ seq 10 | parallel aws sqs send-message --queue-url "<queue-url>" --message-body "aws_sqs"

But I am being told my aws command is incorrect. Runs OK without parallel

Many Thanks


scasey 07-18-2018 01:01 AM

From man parallel


parallel [options] [command] -- [argument ...]
parallel [options] -- [command ...]

so there needs to be two hyphens (--) between either the command and its arguments or between parallel and the command.

Review the man page to figure out which applies. My guess would be the first one.

$ seq 10 | parallel aws -- sqs send-message --queue-url "<queue-url>" --message-body "aws_sqs"

aidylewis 07-18-2018 08:36 AM

Both -- infixes, give aws unknown options. Does I need to operate on a list?

scasey 07-18-2018 09:11 AM

Here's a link to the man page

Maybe -n option...I don't know.

All times are GMT -5. The time now is 03:33 PM.