- @if (0)==(0) echo off
- cscript //nologo //e:jscript "%~0" < a.txt > b.txt
- pause & exit
- @end
-
- while(!WSH.StdIn.AtEndOfStream){
- var arr = WSH.StdIn.ReadLine().match(/\S+/g);
- if (arr) {
- var m = [], s = arr.sort().join(' ') + ' ';
- s.replace(/(\S+ )\1*/g,
- function(a,b){if(a.split(' ').length == 4) m.push(b)}
- )
- WSH.Echo(m.join(''));
- }
- }
复制代码
|