I would like to do auto testing one of my scripts and here documents are almost perfect. It would be nice however to be able to copy the STDIN to STDOUT so it's just as if it was typed in when the here document is pushed into the script (see the inputs on every run). Is this easily doable?
I have at the moment (doesn't show input as user would type and see, only shows output):
#!/bin/sh make && ./proj <<- EOF i 3 i 9 i 55 i 345 t s 33 s 455 i 44 i 99 t q EOF