Skip to content

Instantly share code, notes, and snippets.

@rpherrera
Last active August 31, 2023 01:26
Show Gist options
  • Save rpherrera/d7a4d905775653b88e5f to your computer and use it in GitHub Desktop.
Save rpherrera/d7a4d905775653b88e5f to your computer and use it in GitHub Desktop.
get aws ecr repositories names with aws cli, parsing results with jq and stripping double quotes with sed or tr
#!/bin/bash
# stripping double quotes with sed
aws ecr describe-repositories | jq '.repositories[].repositoryName' | sed s/\"//g
# stripping double quotes with tr
aws ecr describe-repositories | jq '.repositories[].repositoryName' | tr -d '"'
@ramirez368
Copy link

and sorry if you want to filter even more, let's say specific image_tag on that repo, you'll add another jq paramenter?

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