A typical interaction for a program I've written might look like this:
Enter command: a_command Completed a command Enter command: another_command Completed another command
I typically run my program like
./program < input.txt, where
input.txt would contain:
I want to be able to capture the entire interaction (not just the output) like above. How can I do this with bash?
program is a binary (specifically, it's in C++), not a bash script. I have access to the source code, but I'd like to do this without having to modify the source code.