0

Using the mono CLI on Linux, I am trying to find a way to pipe stdout to a script (or equivalent). The example below shows the spirit of what I meant but it doesn't work. From what I can tell, the script myscript.sh is never executed.

In the example below, netframeworkapp.exe is a long running .NET Framework process being run in Mono on Ubuntu. When run in a console on Windows, it constantly writes output to the console. On Windows, I can pipe that output to Power shell cmdlets. If possible, I want to pipe the output in the bash shell to myscript.sh for processing. Also, my script.sh is tested with a mock script and does correctly read stdin; it just seems to not get anything from mono.

#!/etc/bash

mono netframeworkapp.exe | my script.sh
R Mac
  • 184
  • 7
  • Does this answer your question? [Pipe input into a script](https://stackoverflow.com/questions/19408649/pipe-input-into-a-script) – SushiHangover Jul 07 '20 at 01:11
  • @SushiHangover No but thanks. I forgot to mention I do know how to read stdin in myscript.sh. The problem is my script.sh isn't getting executed when piping from Mono. (I know my script works because I tested it with a mock script that just echoes data in the proper format.) – R Mac Jul 07 '20 at 01:13

0 Answers0