views:

158

answers:

3
+3  A: 

The \c keeps the cursor on the same line after the end of the echo, but to enable it, you need the -e flag:

echo -e "bla bla \c"
anon
+3  A: 

I think the attempt is to terminate echo without a new line.

If it does not work on your system, you can replace this way,

echo "test \c"; echo " same line"

can become,

echo -n "test"; echo " same line"

An easier change will be (as suggested by Neil, +1 there),

echo -e "test \c"; echo " same line"
nik
Using printf is more portable than echo -n.
William Pursell
@William, I completely agree. But, when you are porting scripts, a short trick like the `-e` or `-n` works faster.
nik
+1  A: 

No automatic line break, apparently:

Use in UNIX Shells

UNIX Korn shells use the \c escape character to signal continuation (no automatic line break):

echo "Enter the path to the data file: \c"

Mark Rushakoff