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:(

0

1 Answer 1

0

You could use a named pipe:

mknod /tmp/pipe p
./generate 10 8 > /tmp/pipe
gdb --args ./find 257
(gdb) run < /tmp/pipe
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.