5

Simulate keyboard input in bash OR stdin redirection where stdin remains visible

view full story
linux-howto

http://unix.stackexchange.com – I was wondering if I could redirect a file to the stdin of a program so that I could actually see the lines of the file as they're being used. Suppose I have a CLI program with the following flow (in a loop): A) Computer asks question B) User answers it C) Computer responds Running this interactively yields output (which can be copied and pasted from the terminal) that intermixes user answers with computer generated text. I need to get the same result for a situation where the program is run non-interactively and where the answers are predefined in a file. Running program Is there a w (HowTos)