This is not a duplicate, see bolded parts; please vote to re-open
I am attempting to execute an external application via C#.
I wish to pass stdin
into the started application, and capture the result.
The equivalent bash command would be:
echo Typist 1 . 0 | figlet-2.2.5/figlet -f Slant
In C#, how can I run the above command and store its stdout
into a variable?
I have tried using Process.Start("figlet-2.2.5/figlet", "-f Slant")
, but this doesn't work because the application:
- needs data via
stdin
- requires parameters to be supplied
- and provides output via
stdout