Skip to content

Instantly share code, notes, and snippets.

@loretoparisi
Last active August 20, 2021 09:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save loretoparisi/e892ef134c289165c188238250dedada to your computer and use it in GitHub Desktop.
Save loretoparisi/e892ef134c289165c188238250dedada to your computer and use it in GitHub Desktop.
AWS S3 CAT to BASH
#!/bin/bash
function __awscat {
if [ "$1x" != 'x' ]; then
aws s3 cp --quiet "$1" /dev/stdout
fi
}
__awscat $1
@loretoparisi
Copy link
Author

USAGE

./awscat.sh s3://my-bucket/my-folder/my-file

Combined to jq to pretty print a json file

./awscat.sh s3://my-bucket/my-folder/my-file | jq

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment