I have a problem.
I want to run a ruby script from another ruby script and capture it\'s output information while letting it output to the screen too.
Have your script do its prompt output to stderr.
echo "Enter something" >&2 read answer echo "output that will be captured"
This will be done for you if you use read -p to issue the prompt:
read -p
read -p "Enter something" answer echo "output that will be captured"