What is the Bash Escape Character "\c"? What is the Bash Escape Character "\c"? unix unix

What is the Bash Escape Character "\c"?


That's actually specific to some versions of echo (I'm pretty sure that \c came from SysV while the -n version was a BSD-ism).

It simply means don't output the trailing newline.


See the echo man page or the section on echo in the Bash Builtins section of the Bash manual:

echo interprets the following escape sequences:

...
\c
     suppress further output


It's the 'End of Text' control character; it informs the Shell that the end of text has been reached.

Not entirely sure that it's relevant any more, but I could be wrong.

here's the doc:

http://en.wikipedia.org/wiki/ASCII#ASCII_control_characters

and:

http://en.wikipedia.org/wiki/End-of-text_character