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