- 论坛徽章:
- 0
|
本帖最后由 sandermansxj 于 2014-06-25 14:28 编辑
文本A.xml 里面有很多行内容,在这其中有6行内容(不是连续的6行) 如下,我已经用 grep "<windows_root_path " A.xml 匹配到了这6行
<windows_root_path cmm_root_path_var="APPS_BUILD_ROOT">\\cloud\builds631\PROD\LNX.LA.3.7.1-01010-8x16.0-1\</windows_root_path>
<windows_root_path cmm_root_path_var="MPSS_BUILD_ROOT">\\cloud\builds485\PROD\MPSS.DPM.1.0-00512-M8916EAAAANVDM-1\</windows_root_path>
<windows_root_path cmm_root_path_var="BOOT_BUILD_ROOT">\\cloud\builds437\PROD\BOOT.BF.3.0-00087-M8916AAAAANAZB-1\</windows_root_path>
<windows_root_path cmm_root_path_var="TZ_BUILD_ROOT">\\cloud\builds406\PROD\TZ.BF.2.5-00094-M8916AAAAANAZT-1\</windows_root_path>
<windows_root_path cmm_root_path_var="RPM_BUILD_ROOT">\\cloud\builds455\PROD\RPM.BF.2.0-00068-M8916AAAAANAZR-1\</windows_root_path>
<windows_root_path cmm_root_path_var="WCNSS_BUILD_ROOT">\\cloud\builds652\PROD\CNSS.PR.1.4.2-00052-M8916AAAAANAZW-1\</windows_root_path>
现在需要把这6行的内容分别修改为以下内容,并且保存到文件A.xml 里去。
<windows_root_path cmm_root_path_var="APPS_BUILD_ROOT">.\</windows_root_path>
<windows_root_path cmm_root_path_var="MPSS_BUILD_ROOT">.\</windows_root_path>
<windows_root_path cmm_root_path_var="BOOT_BUILD_ROOT">.\</windows_root_path>
<windows_root_path cmm_root_path_var="TZ_BUILD_ROOT">.\</windows_root_path>
<windows_root_path cmm_root_path_var="RPM_BUILD_ROOT">.\</windows_root_path>
<windows_root_path cmm_root_path_var="WCNSS_BUILD_ROOT">.\</windows_root_path>
请问如何简洁的实现这个需求呢,新手入门,谢谢各位了!
|
|