You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The AWS CLI Command can result in multiple objects being listed on the same line which breaks the subsequent while read line loop.
I fixed it locally by changing it to: aws s3api list-objects --bucket BUCKET --prefix public-keys/ --region REGION --output text --query 'Contents[?Size>0].Key' | sed -e 'y/\\t/\\n/' | tr '\t' '\n' > ~/keys_retrieved_from_s3
Note the replacement of tab characters with newlines: tr '\t' '\n'
I'd be happy to contribute a PR if it helps.
The text was updated successfully, but these errors were encountered:
Hello @yourbuddyconner
Thanks for you complimentary, I'm happy to know that my module is used by someone 😄
This is normally already done by the sed -e 'y/\\t/\\n/'
The tr should be useless
When have tested are you sure that sed -e 'y/\\t/\\n/' was replaced by sed -e 'y/\t/\n/' (notice the \) ?
Hey! Thanks for the module, it's super useful!
I ran into a little issue here: https://github.com/Guimove/terraform-aws-bastion/blob/master/user_data.sh#L116
The AWS CLI Command can result in multiple objects being listed on the same line which breaks the subsequent
while read line
loop.I fixed it locally by changing it to:
aws s3api list-objects --bucket BUCKET --prefix public-keys/ --region REGION --output text --query 'Contents[?Size>
0].Key' | sed -e 'y/\\t/\\n/' | tr '\t' '\n' > ~/keys_retrieved_from_s3
Note the replacement of tab characters with newlines:
tr '\t' '\n'
I'd be happy to contribute a PR if it helps.
The text was updated successfully, but these errors were encountered: