So I am trying to debug a program which requires the user to input some text through the terminal:
$ echo 'here is the text' | ./program
How do I simulate that input in GDB?
You can run the program with input redirected:
echo 'here is the text' > intput.txt
gdb ./program
(gdb) run < intput.txt