回复 9# sweet惜缘 - //&cls&cscript -nologo -e:jscript "%~f0" "DTI.txt" "link.txt">out.txt&pause&exit
-
- var fso = new ActiveXObject('Scripting.FileSystemObject');
- var f1 = fso.OpenTextFile(WScript.Arguments(0), 1);
- var f2 = fso.OpenTextFile(WScript.Arguments(1), 1);
- var map={};
- while(!f1.AtEndOfStream){
- if(/^\s*(\S+)\s+(.+)$/.test(f1.ReadLine())){
- map[RegExp.$1]=RegExp.$2;
- }
- }
- f1.Close();
- while(!f2.AtEndOfStream){
- str = f2.ReadLine().split(/\s+/);
- WSH.echo(str[0]+'\t'+str[1]+'\t'+map[str[0]]+' '+map[str[1]])
- }
- f2.Close();
复制代码
|