shell函数,查找文件中的中文字符串,并对整行进行替换、新增和删除。

####公共函数-替换文件中字符串,替换整行字符串 ####函数参数样例:file_match "/etc/httpd/conf/httpd.conf" "KeepAlive " "KeepAlive on" ####参数1:文件路径和文件名称 ####参数2:须要匹配的关键字 ####参数3:替换的整行内容 ####备注:若文件中有多处被匹配到,则不进行替换 function file_matc
相关文章
相关标签/搜索