plz understand my query...

Hi everyone!
Sometimes if we type arrow keys or DEL key or ESC key while reading any input string, we are unable to see that key values. But, if you open the particular file in vi/gvim editor ,you can see some junk chars wherever you pressed above keys(^[[D^[[A^[[B).

Is it possible to remove those junk chars?
Is there any system related commands for validate those junk chars?
orelse no way for get the exact string without junk chars.

I hope I can get the solution on this forum...

~Bala:o

sed 's/[[:cntrl:]]//g'

Next time use a bit more interessting title for your thread so other people can see from outside what it's about, please.