Say I have some content in a ruby string and I want to pass it as
stdin input to a command. I then want to read the output.
I tried this:
IO.popen(“mycommand”, mode=‘r+’) do |io|
result = io.read
This resulted in a “Broken Pipe” exception. What’s the correct way to do