Created
June 29, 2022 16:33
-
-
Save amitkrout/11cd85d10bf54d6c5e4466d501f359b0 to your computer and use it in GitHub Desktop.
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 | |
| echo "Dict test" | |
| declare -A appdomain_workflowID=( | |
| ["test-$1/$2"]="cow" | |
| ["test-$1/$2"]="dog" | |
| ["test-$1/$2"]="cat" | |
| ["test-$1/$2"]="fish" | |
| ) | |
| declare -A appdomain_service=( | |
| ["ser1-Deploy"]="CO" | |
| ["ser2-Deploy"]="ho" | |
| ["ser3-Deploy"]="fd in" | |
| ["ser4-Deploy"]="nu" | |
| ) | |
| for key in ${!appdomain_service[@]}; | |
| do | |
| if [ $key == $2 ] | |
| then | |
| if grep -q "$3" <<< "${appdomain_service[$key]}" | |
| then | |
| echo "Service falls under correct AppDomain... Good to go" | |
| else | |
| echo "Service does not fall under correct AppDomain... Not good... Exiting" | |
| exit 1 | |
| fi | |
| fi | |
| done |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
$ ./dict.sh ST Mo install