Rectangle 27 1

Linux - How to run multiple command in a single line?

Use define command to define your own command:

(gdb) define mycommand
Type commands for definition of "mycommand".
End with a line saying just "end".
>info threads
>c
>end
(gdb) mycommand

For detailed information, you can refer: https://sourceware.org/gdb/onlinedocs/gdb/Define.html#Define.

Note Linux lldb