Skip to content

Instantly share code, notes, and snippets.

@iamleet
Last active September 5, 2017 15:19
Show Gist options
  • Save iamleet/46f3f7b56476410c2b8213b26751bbb6 to your computer and use it in GitHub Desktop.
Save iamleet/46f3f7b56476410c2b8213b26751bbb6 to your computer and use it in GitHub Desktop.
## One liner to parse an arn from json on aws cli - yee
data=`aws elbv2 describe-target-groups --names kast-web-staging | grep "TargetGroupArn\": \"arn:"` | cleanMe=${data##*arn | arn=arn${cleanMe%%\",*}
echo $arn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment