Last active
September 11, 2017 18:21
-
-
Save chx/31bd9db5c8e5e388875a401a3ef88778 to your computer and use it in GitHub Desktop.
services-grep
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ruby -ryaml -rjson -e 'puts JSON.pretty_generate(YAML.load(ARGF))' $2 | \ | |
jq -Mr --arg name "$1" '.services | keys[] as $k | .[$k] | select(.tags[]?.name == $name) | $k' | |
# ag -l -G '.services.yml$' access_check| while read filename ;do services-grep access_check "$filename" ;done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment