我不知道sed会不会冲突到,目前我整个处理文本的指令如下- sed -r "s/.*part([0-9][0-9][0-9]).rar.*src=.(.*). border.*/StrCpy $download\1 '\2'/" a.txt >output.txt
-
- sed -i "/^$/d" output.txt
-
- sed -e "s/download00/download/g" output.txt
-
- @echo off
- (for /f "delims=" %%a in ('sort /+12 output.txt') do (
-
- set str=%%a
- setlocal enabledelayedexpansion
- set str=!str:$download0=$download!
- echo !str:$download0=$download!
- endlocal
- ))>$
- move $ output.txt
复制代码
|