0

I'm entering the following on the linux command line:

./generate 10 8 | ./find 257

I would like to run gdb on the find command while piping output to it and passing it a parameter. How do you do that? ./generate 10 8 | gdb ./find 257

Doesn't work of course. Can't figure it out:(

Darc Nawg
  • 1,415
  • 3
  • 15
  • 25

1 Answers1

0

You could use a named pipe:

mknod /tmp/pipe p
./generate 10 8 > /tmp/pipe
gdb --args ./find 257
(gdb) run < /tmp/pipe
Employed Russian
  • 199,314
  • 34
  • 295
  • 362