ci用sed可避免每次改动都和库

替换某一行的内容,命令如下:

 

sed -i '16cimport containerType'  /home/BaselineImpactAnalysis/Product/Feature/pon/testParseJsonPath.py
sed -i '28cif(not containerType.ifPond()):'  /home/BaselineImpactAnalysis/Product/Feature/pon/testParseJsonPath.py
sed -i '29c\ \ \ \ myJsonPath = pong_json_path'  /home/BaselineImpactAnalysis/Product/Feature/pon/testParseJsonPath.py

 

WorkflowScript: 4: unexpected char: '\  用 \\试试

https://qa.1r1g.com/sf/ask/3442419571/

 

sed '行号c 新的内容' 要处理的文件

 

posted @ 2023-02-10 16:00  cnchengv  阅读(21)  评论(0编辑  收藏  举报