0

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:

  1. needs data via stdin
  2. requires parameters to be supplied
  3. and provides output via stdout
Community
  • 1
  • 1
theonlygusti
  • 11,032
  • 11
  • 64
  • 119

0 Answers0