Copy stdin to stdout: Difference between revisions
Content deleted Content added
Thundergnat (talk | contribs) m →{{header|C sharp}}: Regularize header markup to recommended on category page |
Added JavaScript with Node.js example |
||
Line 411:
Line 2.
</pre>
=={{header|JavaScript}}==
JavaScript in the browser does not have a stdin or stdout, but using Node.js we have:
<lang JavaScript>process.stdin.resume();
process.stdin.pipe(process.stdout);</lang>
<lang bash>node index.js < index.js</lang>
{{out}}
<pre>
process.stdin.resume();
process.stdin.pipe(process.stdout);
</pre>
|