gpt4 book ai didi

xml - 用 sed 替换 xml 值

转载 作者:数据小太阳 更新时间:2023-10-29 01:59:47 30 4
gpt4 key购买 nike

<分区>

我想替换 XML 文件中的值。示例 XML

<Console>
<!-- REQUIRED PARAMETERS -->
<!-- Enter the node that you are running the installation program from. This value must be a fully qualified name, which includes a host name and domain name. For example, node001.server.name.com.-->
<node>node.sample.ibm.com</node>

<!-- Enter the domain name of the cluster as a single dot-separated string. For example, server.name.com. -->
<sso-domain-name>sample.ibm.com</sso-domain-name>

<!-- Set this property to true if your InfoSphere BigInsights Console uses HTTPS. Otherwise, enter false. -->
<https>false</https>

<!-- management-console-port specifies which port is used by the Management Console. -->
<management-console-port>8080</management-console-port>

我想替换值。我尝试跟随但它不起作用。任何帮助表示赞赏。

sed -i "/<Console>/,/<\/Console>/ s/<node>[0-9][a-z]\+/<node>newvalue

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com