Skip to content

Instantly share code, notes, and snippets.

@Jlaird
Created March 12, 2019 17:33
Show Gist options
  • Save Jlaird/91f83f83ae93e0e12d11833efe29464c to your computer and use it in GitHub Desktop.
Save Jlaird/91f83f83ae93e0e12d11833efe29464c to your computer and use it in GitHub Desktop.
#!/bin/bash
months=(
"01"
"02"
"03"
"04"
"05"
"06"
"07"
"08"
"09"
"10"
"11"
"12"
)
years=(
"2000"
"2001"
"2002"
"2003"
"2004"
"2005"
"2006"
"2007"
"2008"
"2009"
"2010"
"2011"
"2012"
"2013"
"2014"
"2015"
"2016"
"2017"
"2018"
"2019"
)
for year in "${years[@]}"; do
echo $year
for month in "${months[@]}"; do
echo $month
aws s3 rm --recursive s3://media.cygnus.com/files/base/bizbash/bzb/image/$year/$month/1280w
aws s3 rm --recursive s3://media.cygnus.com/files/base/bizbash/bzb/image/$year/$month/160w
aws s3 rm --recursive s3://media.cygnus.com/files/base/bizbash/bzb/image/$year/$month/320w
aws s3 rm --recursive s3://media.cygnus.com/files/base/bizbash/bzb/image/$year/$month/640w
aws s3 rm --recursive s3://media.cygnus.com/files/base/bizbash/bzb/image/$year/$month/960w
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment