
CODE: [Copy to clipboard]缺陷,a.txt中不能含有%@echo off&setlocal enabledelayedexpansion
(for /f "tokens=*" %%a in (a.txt) do (
set line=%%a
set line=!line:hello=hello%%!
call echo !line!%%
))>b.txt
CODE: [Copy to clipboard]sed s/\bhello\b.*/hello/ a.txt > b.txt
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |