nickst97
nickst97

Reputation: 23

GDB: run with 2 commands

i am executing my program like this to give it some txt files as inputs

cat 1.txt 2.txt | ./myprogram

How can i run gdb with out entering manually all the txt files?

thnx <3

Upvotes: 0

Views: 48

Answers (1)

Employed Russian
Employed Russian

Reputation: 213375

Try:

gdb ./myprogram

(gdb) run <(cat 1.txt 2.txt)
(gdb) run <(cat {1,2}.txt)

Or

gdb -ex 'run <(cat {1,2}.txt)' ./myprogram

Upvotes: 1

Related Questions