Quick Shell Script to Download Files
Here is a shell script that I ran from the command line to do some file downloads from S3. Note the sh Parameter Expansion to parse the url.
for url in 'https://example-bucket.s3.amazonaws.com:443/example.tomswebhosting.com.zip?Expires=1234567890&AWSAccessKeyId=12345678901234567890&Signature=123456789012345678901234567%3D' 'https://example-bucket.s3.amazonaws.com:443/example.tomswebhosting.com.zip?Expires=1234567890&AWSAccessKeyId=12345678901234567890&Signature=123456789012345678901234567%3D';
do
file=${url##*443/}; # get everything after "433/" in the url
file=${file%%\?*}; # get everything before "?" in the url
wget --no-check-certificate "$url" -O $file;
done