How can I read from standard input and write to standard output. System.Diagnostics.Process.StandardInput The MSDN link did not help, since it separately starts the process and then redirects standard input / output, but what if the process is already running and called my application to transfer some data to it. Here is an example to make things a little clear:
I just use Unix channels, i.e. the cat command in cygwin (Linux as a windowing medium), which basically just reads standard input and prints to standard output. following command:
% cat input / sample.txt | Src / csharp / maptest
But that does not work.
If someone knows the ruby ββhere since I don't do this, I want to do the same in C #:
STDIN.each_line
do |line|
some code here
end
- , # vb.net:
import re
import sys
for line in sys.stdin:
val = line.strip()
?
.