有人告诉我,当它通过“添加另一个部分”替换文本时,我可以防止这段代码下推。这意味着什么?
这是代码:
for /f "delims=" %%a in (list.txt) do (
findstr "%%a" "C:\Users\P Ditty\Documents\SH3\data\cfg\Backups_SCR*.clg" >nul
if not errorlevel 1 (
find "%%a" < "Campaign_SCR.mis.tmp" >nul && (
sed "s/^Name=.*%%a.*/Name=ShipDummy\nClass=ShipDummy\nType=206/" "Campaign_SCR.mis.tmp" > "Campaign_SCR.mis.tmp.tmp2"
move "Campaign_SCR.mis.tmp.tmp2" "Campaign_SCR.mis.tmp" >nul
)
)
)