標準入力.StdIn.StdOut


cscript をインタープリターとして実行すると stdin, stdout の入出力を利用できる。
var stdin = WScript.StdIn; var stdout = WScript.StdOut; while (!stdin.AtEndOfStream){ var str = stdin.ReadLine(); stdout.WriteLine("Line " + (stdin.Line - 1) + ": " + str); }
コマンドプロンプトからパイプで渡す。
type test.txt | cscript /nologo test.js
__LINK__(cmd::type)