不知行否,会在当前目录下创建结果文件
不知道会不会快点- @echo off
-
- set "filepath=D:\DATA\data.txt"
-
- if not exist "%filepath%" echo file not found&pause&exit/b
- set "filepath=%filepath:\=\\%"
- gawk "BEGIN{i=0;while(getline <\"%filepath%\"){i=index($0,\"=\");if(i){o=substr($0,0,i-1);s=substr($0,i+1);gsub(/ /,\"\r\n\",s);print s >o\".txt\"}}}"
- echo done&pause
复制代码
|