This commit is contained in:
vincent 2024-05-18 16:44:54 +08:00
parent 21679a291a
commit 8f0fc71c76

View File

@ -1,6 +1,7 @@
#!/bin/bash #!/bin/bash
# 修改json文件的属性值 # 修改json文件的属性值
# 调用方式modify_json_file "/foo/bar.json" "person.name" "张三"
function modify_json_file() { function modify_json_file() {
local json_file=$1 # json文件路径 local json_file=$1 # json文件路径
local key=$2 # 要修改的key local key=$2 # 要修改的key