LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-17-2018, 07:38 AM   #1
aidylewis
LQ Newbie
 
Registered: Apr 2016
Posts: 25

Rep: Reputation: Disabled
GNU parallel aws cli


Hello,

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

Aidy

Last edited by aidylewis; 07-17-2018 at 09:24 AM.
 
Old 07-18-2018, 01:01 AM   #2
scasey
Senior Member
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.7.1908
Posts: 4,252

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
From man parallel
Code:
Synopsis

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.
Code:
$ seq 10 | parallel aws -- sqs send-message --queue-url "<queue-url>" --message-body "aws_sqs"
 
Old 07-18-2018, 08:36 AM   #3
aidylewis
LQ Newbie
 
Registered: Apr 2016
Posts: 25

Original Poster
Rep: Reputation: Disabled
Both -- infixes, give aws unknown options. Does I need to operate on a list?
 
Old 07-18-2018, 09:11 AM   #4
scasey
Senior Member
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.7.1908
Posts: 4,252

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
Here's a link to the man page

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


Reply

Tags
bash, gnu, parallel


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Get more done at the Linux command line with GNU Parallel LXer Syndicated Linux News 0 05-11-2018 10:30 AM
LXer: Easy way to install AWS CLI on Linux LXer Syndicated Linux News 0 04-02-2018 09:03 AM
CentOS 7 w/KDE - Trying to get AWS CLI & Terraform installed buymycorp Linux - Newbie 2 03-19-2017 08:55 PM
[SOLVED] Executing a command in parallel | GNU parallel or xargs the_gripmaster AIX 3 05-08-2012 08:41 AM
Gnu make parallel problem Andrew Benton Programming 7 11-28-2010 10:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration