Created
January 5, 2021 17:04
-
-
Save instantiator/af461a3ffbb6ea8022064b13f8ac432e to your computer and use it in GitHub Desktop.
summarise the entity ids found in yaml configuration files
This file contains hidden or 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
| #!/bin/bash | |
| # provide the path to your configuration yaml files as the only parameter | |
| DIR=$1 | |
| echo \"file\",\"simple id\",\"LOAs\",\"entity id\",\"MSA entity id\" | |
| for FILE in "$DIR"/*.yml; do | |
| FILENAME=$(basename $FILE) | |
| SIMPLE_ID=$(yq eval '.simpleId' $FILE) | |
| LOAs=$(yq eval '.levelsOfAssurance' $FILE) | |
| TRANSACTION_ENTITY_ID=$(yq eval '.entityId' $FILE) | |
| MSA_ENTITY_ID=$(yq eval '.matchingServiceEntityId' $FILE) | |
| echo \"$FILENAME\",\"$SIMPLE_ID\",\"$LOAs\",\"$TRANSACTION_ENTITY_ID\",\"$MSA_ENTITY_ID\" | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment