On Mon, 2011-09-26 at 14:19 -0500, Entanglement wrote: > Sorry for the late reply, I'm very busy with exams coming up (mid-terms). > > Okay, so yes I do plan on using GNU Debugger, and just to help you out too, the command "c" under GNU Debugger will continue Portal. > > Anyways, here's what I am trying to execute: > > > Code: > ps -ef | grep hl2.exe > Firstly, you need to trim this to just the pid and capture the result as a shell variable: <code> pnum=$(ps -ef | gawk '$8 == /ntpd/ { print $2 }') </code> and then you can pass it to gdb, which should read its commands from a here document: <code> gdb --pid $pnum <<EOF handle SIGSTOP nostop noprint handle SIGSEGV nostop noprint handle SIGUSR1 nostop c EOF </code> I've tested the first code fragment but not the second. Martin > > > > To find hl2.exe's profile #. > > > Code: > > > > The #'s refer to the hl2.exe pid. > > and then with gdb: > > > Code: > (gdb) handle SIGSTOP nostop noprint > (gdb) handle SIGSEGV nostop noprint > (gdb) handle SIGUSR1 nostop > (gdb) c > > > > > What I want to do is use the gdb --pid code and the gdb commands as soon as hl2.exe is detected from Team Fortress 2 in my bash script. > > > >