i use JSON.sh as curl 'http://conf.com/conf/config_20150920_test.json' | ./JSON.sh -l -p -b -s and it work greet and it return result like
["storage","mysql","u_db","database"] "dev"
["storage","mysql","u_db","username"] "user"
["storage","mysql","u_db","password"] "123@1"
["storage","mysql","u_db","internal_ip"] "10.176.192.120"
["storage","mysql","u_db","internal_port"] 3306
["storage","mysql","a","database"] "a"
["storage","mysql","a","username"] "user"
["storage","mysql","a","password"] "122a@1"
but what if add config param to determine how output look like and go with exporting this variables as env variables like
storage_mysql_u_db_internal_port=3306
storage_mysql_a_database=a
storage_mysql_a_username=user
storage_mysql_a_password=122a@1
which make it easy to be evaluated with eval as environment variable.
i use JSON.sh as
curl 'http://conf.com/conf/config_20150920_test.json' | ./JSON.sh -l -p -b -sand it work greet and it return result likebut what if add config param to determine how output look like and go with exporting this variables as env variables like
which make it easy to be evaluated with
evalas environment variable.