Skip to content

Instantly share code, notes, and snippets.

@loretoparisi
Last active April 18, 2019 11:08
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/6ba7de22c00352313c38a4f7b82e9693 to your computer and use it in GitHub Desktop.
Save loretoparisi/6ba7de22c00352313c38a4f7b82e9693 to your computer and use it in GitHub Desktop.
AWS CAT - Cat a file from Aws Bucket in Bash
function __awscat {
if [ "$1x" != 'x' ]; then
aws s3 cp --quiet "$1" /dev/stdout
fi
}
alias awscat='__awscat'
@loretoparisi
Copy link
Author

Usage:
Place this in your bash profile and use like

awscat s3://mybucket/myfile

so that you can do pipes, grep, etc.

awscat s3://mybucket/myfile | grep "pattern"

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