How do I use GNU parallel with aws sync command?
I have a file with the following commands:
aws s3 cp ./test s3://test --recursive --content-encoding "gzip" --content-type "text/html" --cache-control "max-age=$MAXAGE" --exclude "*" --include "*.html" --profile $PROFILE aws s3 cp ./test s3://test $S3BUCKET --recursive --content-encoding "gzip" --content-type "text/html" --cache-control "max-age=$MAXAGE" --exclude "*" --include "*.css" --profile $PROFILE How can I use GNU parallel to run these commands in parallel?
What I did was add the commands in a file called test.sh
and I run the following command
parallel < test.sh ] How do I pass in arguments to the test.sh file? For example, I want to pass in the aws bucket name.
&instead of GNU parallel.--halt 2?--halt 2is the GNU parallel option that kills all jobs if one fails.--halt 1just doesn't execute any more jobs, which is what&would accomplish.