半bat
记录文件编码gbk- @if (0)/*==(0)/* echo off
-
- type "aaa.txt" | cscript //nologo //e:jscript "%~f0" >bbb.txt
-
- pause&exit/b
- rem */@end
-
- var s;
- while (!WScript.StdIn.AtEndOfStream) {
- s=WScript.StdIn.ReadLine();
- if(!s){WScript.Echo(s);}
- else {WScript.Echo(s.replace(/ *$/,''));}
- }
复制代码
|