Some times my Unix terminal gets destroyed, either by:
I can type commands, but characters are not echoed on the screen. When I press enter, the prompt is printed on the same line as the current one (newline is not inserted first)
If I accidentally do
caton a binary file, then the charset is changed so that commands I type are shown as garble rather than normal ascii.
Is there any fix-all-way to restore the shell back to normal, or do I just have to close the terminal and start a new one?
(I am on Mac with Bash at the moment, but I've had this on other systems too.)