2

To start debugging I need to do this steps:

screen -S gdb_program gdb /path/to/program

handle SIGPIPE nostop noprint pass - is gdb command

c - is gdb command

How to write a single shell script which I can run just:

./gdb.sh

1 Answer 1

5

Use a Here Document:

#!/bin/bash
screen -S gdb_program gdb /path/to/program <<EOF
handle SIGPIPE nostop noprint pass
EOF
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.