我在跑:
$ jq ".environments[] | select(.name | contains(\"docker\")) | .database.database_config.host = \"${DGRAPHIP}\"" weaviate.conf.json
在这个文件上:https ://github.com/weaviate/weaviate/blob/develop/weaviate.conf.json
这个的输出是(如果DGRAPHIP = 1.2.3.4
):
{
"name": "docker",
"database": {
"name": "dgraph",
"database_config": {
"host": "1.2.3.4", <== THIS IS GOOD!
"port": 9080
}
},
"schemas": {
"Thing": "https://raw.githubusercontent.com/weaviate/weaviate-semantic-schemas/master/weaviate-Thing-ontology-s
chema_org.min.json",
"Action": "https://raw.githubusercontent.com/weaviate/weaviate-semantic-schemas/master/weaviate-Action-ontology
-schema_org.min.json"
},
"mqttEnabled": false
}
这不是预期的结果,我希望将结果封装为:
{
"environments": [{
RESULTS
}]
}