I want to use system("insert shell command here")
and pass in a script. This script however, requires user input. I want to pass in the user input as well. How do I do this?
I tried:
system('./script')
system('input1')
system('input2')
However, Ruby waits till the first system call is done and then only proceeds to go to the next one.
Is it possible to do this? I've tried system('./script', 'input1')
but that didn't work either.
No luck with exec
either.