Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

usage of \n and \c in scripts

Status
Not open for further replies.

epidor

MIS
Jul 10, 2003
6
FR
Hi everybody,

I have a doubt.

When you write :

echo "hello \n\n"

this print hello with 2 lines empty, isn't it ?

and :

echo "enter your name: \c"

This print only enter your name without go to line ?

Because i try that in bash, and it doesn't works !
Thanks.
 
'echo' is bash's builtin.
What exactly "echo 'foo\c'" do for you in bash?

vlad
+----------------------------+
| #include<disclaimer.h> |
+----------------------------+
 
try using...

echo -e &quot;Enter your name: \c&quot;

The &quot;-e&quot; enables interpretation of the &quot;backslash&quot;
escape characters (i.e. &quot;\c&quot;)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top