On Sat, 2011-09-24 at 18:36 -0500, SpawnHappyJake wrote: > Darn. Even if I do this from a terminal while Portal is in an emulated desktop: > > > Code: > > echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope > hl2Pid=`pgrep hl2.exe` > gdb --pid $hl2Pid &> /home/shjake/Desktop/hl2dbg.log > Have either of you tried here documents? Here's a tested example: ================start of testscript================ #!/bin/bash echo "Starting cat read lines from a here document ended by EOF" cat <<EOF line 1 line 2 EOF echo "End of example here document" =================end of testscript================= Substitute gdb for cat and gdb commands for 'line 1' and 'line 2'. This should work a lot better than echo because you can put as many lines as you want in the here document. You can also use shell variables for text substitution in it - see the bash manpage f0or details. Martin