本帖最后由 WHY 于 2016-1-3 19:13 编辑
sed会直接修改源文件,请注意备份- @echo off & setlocal enabledelayedexpansion
- sed -i -r "s/\S/&\n/g; s/^\s+|\s+$//g; /^$/d" *.txt
- for %%i in (1 2 3 4) do set "f=!f! _%%i.txt"
- for /l %%i in (1001 1 1210) do (
- set "n=%%i"
- for %%j in (!n:~1!) do paste -d "" !f: = %%j!>D:\数据2\%%j.txt
- )
- pause
复制代码
|