title: Run executable with stdin set in console
body: <p>A have a linux executable named "foo". The program foo waits until the user writes a string (using scanf) from stdin, and then print the string (to stdout).</p>
  
  <p>How can I set the run the  program, so it won't wait the user writes a string, i.e., it will immediately will read a sting from stdin and then outputs the string?    </p>
  
  <p>P.S The input is not given from a file, but from the console. </p>
  
  <p>Note: a followup question for this problem is published in <a href="https://stackoverflow.com/questions/57744482/paramiko-run-executable-with-stdin-set-in-console">Paramiko: Run executable with stdin set in console</a></p>