Linux sed 替换第一次出现的字符串

/*********************************************************************************
 *                  Linux sed 替换第一次出现的字符串
 * 说明:
 *     需要替换配置文件中第一次出现的文本内容。
 *
 *                                       2016-12-16 深圳 南山平山村 曾剑锋
 ********************************************************************************/

一、参考文档:
    How to use sed to replace only the first occurrence in a file?
        http://stackoverflow.com/questions/148451/how-to-use-sed-to-replace-only-the-first-occurrence-in-a-file

二、测试代码:
    sed -i '0,/IP = .*/s/IP = .*/IP = 10.10.10.10/' /usr/share/config.conf
原文地址:https://www.cnblogs.com/zengjfgit/p/6188311.html