如下有个 json 文件,想把其中 abc 节点中的 IP 给替换成 192.168.1.2, 如何替换?
- 只想替换 abc 节点的 IP,不能把 def 节点的也替换了
- 用 a nsible 怎么替换?
- 如果用不了 an sible,用 sed 如何替换?
abc":{
"a":true,
"IP":"192.168.1.1",
"c":10011,
"d":5,
"e":5
},
"def": {
"a": true,
"Server": [{
"Is": false,
"IP": "192.168.1.1",
"Port": 5577
}]
},
"ghi": {
"a": true,
"ka": {
"ServerIP": "192.168.11.236",
"SPort": 9092,
"Top": "ifaas-secondStructure",
"Gr": "ifaas-engine",
"Us": "",
"Pa": "",
"Sa": false
},