• sed修改json内容


    1、config.json

    {
      "whiteHoleUrl": "http://172.16.80.90/whui/serviceManagement/regist/new/nav",
      "eventInterfaceUrl": "http://172.16.64.49:8080/isv/event_request?url={eventUrl}",
      "oneaaUrl":"http://172.16.80.85:80",
      "mir_pack":truE1,
      "mir_mon":true,
      "sub_system_number":2,
      "whitehole_manager_tenant":"admin_team",
      "specail_manager_tenant_id":"51000000-0000-0000-0000-000000000000"
    }

    2、修改的脚本

    WHITEHOLEURL=http://10.111.131.54/whui/serviceManagement/regist/new/nav
    EVENTINTERFACEURL=http://10.111.131.54:8080/isv/event_request?url={eventUrl}
    ONEAAURL=http://10.111.131.247:8100
    MIR_PACK=truE1
    MIR_MON=false
    SUB_SYSTEM_NUMBER=1
    WHITEHOLE_MANAGE_TENANT=ST_5100
    SPECIAL_MANAGER_TENANT_ID=51000000-0000-0000-0000-000000000000
    sed -i  's#("whiteHoleUrl": ").*#1'"$WHITEHOLEURL"'",#g' $MIRUI_CONFIG
    sed -i  's#("eventInterfaceUrl": ").*#1'"$EVENTINTERFACEURL"'",#g' $MIRUI_CONFIG
    sed -i  's#("oneaaUrl":").*#1'"$ONEAAURL"'",#g' $MIRUI_CONFIG
    sed -i  's#("mir_pack":).*#1'$MIR_PACK',#g' $MIRUI_CONFIG
    sed -i  's#("mir_mon":).*#1'$MIR_MON',#g' $MIRUI_CONFIG
    sed -i  's#("sub_system_number":).*#1'$SUB_SYSTEM_NUMBER',#g' $MIRUI_CONFIG
    sed -i  's#("whitehole_manager_tenant":").*#1'"$WHITEHOLE_MANAGE_TENANT"'",#g' $MIRUI_CONFIG
    sed -i  's#("specail_manager_tenant_id":").*#1'"$SPECIAL_MANAGER_TENANT_ID"'",#g' $MIRUI_CONFIG
  • 相关阅读:
    利用ssh传输文件
    linux 终端常用快捷键
    ubuntu 下关闭apache服务自动启动
    linux ps命令介绍
    virtualenv 使用
    startuml 2.6注册
    三代组装小基因组研究综述
    畅想未来的测序
    测序简史
    纳米孔测序技术介绍
  • 原文地址:https://www.cnblogs.com/boshen-hzb/p/6438236.html
Copyright © 2020-2023  润新知