I have a program and want to debug it in gdb.
Will I see usual program output? How can I enable/disable this output, leaving only gdb messages.
If you just want to see the output of the program as you step through it without gdb's output, this script can be useful.
#!/bin/bash
file=$1
delay=1 #seconds
lastTime=`stat --printf=%y "$file"`
while [ 1 ]
do
thisTime=`stat --printf=%y "$file"`
if [ "$thisTime" != "$lastTime" ]
then
clear
cat "$file"
fi
lastTime="$thisTime"
sleep $delay
done
lastTime="$thisTime" sleep $delay done