
CODE: [Copy to clipboard]或者使用外部工具sedfor /f "delims=" %%a in (1.txt) do (
if not defined %%a set %%a=b & echo %%a>>result.txt
)
CODE: [Copy to clipboard][ Last edited by ngd on 2008-4-13 at 01:15 PM ]sed -n "G;s/\n/&&/;/^\([ -~]*\n\).*\n\1/d; s/\n//;h;P" 1.txt
| Quote: | |
|
CODE: [Copy to clipboard]sed -n "G;s/\n/&&/;/^\(.*\n\).*\n\1/d; s/\n//;h;P" 1.txt
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |