Over a million developers have joined DZone.

Run Command On String, Returning Output

This is basically implementing a Unix-style filter in Windows Scripting Host.

var shell = WScript.CreateObject("WScript.Shell");

var exec = shell.Exec("tr a-z A-Z");
exec.StdIn.Write("hello, world");

Watch out for deadlocks if you're writing huge amounts of data into the command, but it works for reasonable amounts of data (the buffer is probably something like 4K, but I've not tested...)

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}