What is the Bash Escape Character "\c"?

Keith Pinson picture Keith Pinson · Aug 23, 2011 · Viewed 25.3k times · Source

What is the name and function of the \c escape character in Bash? What is its numeric value? I have seen that \cx is a control character, but what about plain \c? It seems that:

echo -e "Hello World\c"

and

echo -en "Hello World"

are equivalent. However, Python doesn't use it as an escape character, and it is missing from all of the lists of escape characters I found. Is this a Bash-specific behavior?

Answer

paxdiablo picture paxdiablo · Aug 23, 2011

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.