I'm using GDB to debug a program I've written and I'm having issues with GDB syntax. The portion of the program I'm testing requires input piped from file (via cat command), so altering the arguments to remove the pipe and read directly from file would defeat the purpose of the test.
Here's the syntax for running the test in bash:
cat input.txt | ./program | cat > output.txt
Is there a way to do this? I've tried debugging both cat and my program, but haven't been able to get it to run the way I need inside of GDB.