Kill a debug command

once I run the debug command for a program, I can't get back to the prompt afterwards. I'm sure there is some escape sequence that will get me back there, but I don't know what it is. Anyone know?--thanks--AJ

control - c will kill it, control - z will suspend it in the background. after pressing control - z you can type fg to bring the process back to the foreground.

I run into this problem with a few different UNIX commands.

For example, grep.

At the prompt of a terminal session I ran: grep sshd

and nothing happens.

I tried control-z and control-c,

but beneath the grep sshd command I typed, it just prints the output as:

^C
^Z

I'm sure there is some simple way to get back to the command line and kill the current command, but I've not figured it out yet.

Your interrupt character is what you're looking for. It is usually control-c, but it can be configured. Use the command "stty -a" to see what yours is.

And "stty intr ^c" (typed literally as you see it) will set intr to be control-c.