Get Rid ^C when pressed Ctrl-C

How do i get rid of the ^C when i pressed Ctrl-C?

Do you want ctrl/C to continue to interrupt (break)?

I am writing a script that show load average in like a bar graph. When i press Ctrl-C it suppose to trap it and pause the bar graph from refreshing. The problem im getting is when i press ctrl-C it pause my graph but it will output ^C into the terminal.

Are you generating the graph on a regular window like putty or are you using x-windows, or a desktop GUI like gnome?

This does what you want with a side effect you do not want

trap "read foo" INT

You have to push return to continue. The problem is the cursor may be in the middle of your plot.

We can fix that with ANSI escape sequences if your terminal window supports that.

Right now im using the code at bottom.

stty -ctlecho #get rid of ^C
tput civis #make cursor invinsible

The thing about stty -ctlecho is that it get rid of ^C but it end up showing a weird character. And im working it on ubuntu so gnome terminal.

Rather than me blindly giving you code, try using ansi escape sequences inside the
trap statement. Use them to:

Save the cursor position,
then move it to a safe spot,
read foo,
restore the cursor.

The CSI sequences and some of the SGR sequences in this page are worth playing around with a bit. There is a CSI code to turn off the cursor. Some terminal settings are affected by locale, too. If you are using an Asian locale, you are probably using unicode or another wide charset.

See:
ANSI escape code - Wikipedia, the free encyclopedia

Is it possible to change the output ^C to something else like a space?

Not that I am aware of - maybe someone else knows. Some shells like bash are extensible. You write C code and sort of link it into bash. You could do that if you have a lot of time.

Loadable built-in commands in bash shows example C code.