I have a program which requires me to input data as the program runs. Imagine it something like so:
$ ./program
Hi there. What's your name? Zambezi
What is your quest? To make a program which runs nicely
What is your favourite color? Red
...
Now, I have a number of test inputs to run my program up against. They all contain something like:
Arthur, King of the Britons
To seek the Holy Grail
...
However, some of my test scripts fail, and unfortunately it is very hard for me to decipher exactly where they failed, as my terminal looks like so:
$ ./program < arthur.txt
Hi there. What's your name?What is your quest?What is your favourite color?...
Is there a way that I can still give input to stdin
via a file, but still have the terminal appear as if I had typed it all in?
Linux Mint 16 is my OS if that matters.