Skip to content

Instantly share code, notes, and snippets.

@satiridev
Created November 6, 2020 03:26
Show Gist options
  • Save satiridev/f0bc23a9092519a5c9686e96dda7ec30 to your computer and use it in GitHub Desktop.
Save satiridev/f0bc23a9092519a5c9686e96dda7ec30 to your computer and use it in GitHub Desktop.
delete list of files from AWS S3 bucket list result
#!/bin/bash
cat my-target-files-in-s3.txt | awk '{print $4}' | while read x; do aws s3 rm "s3://my-bucket-name/$x"; done > my-delete-result.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment