1827791 Members
2719 Online
109969 Solutions
New Discussion

question

 
SOLVED
Go to solution
lnl
Occasional Advisor

question

echo "password\r"
I can't echo the whole thing because of the back slash "\". the shell thinks it's an escape character?

Any slick way to do it?
4 REPLIES 4
Denver Osborn
Honored Contributor
Solution

Re: question

Not sure I understand your question... but you want to echo and have

password\r

returned to STDOUT, right? If so, then do this...

echo "password\\\r"


Is that what you're looking for?

-denver
Patrick Wallek
Honored Contributor

Re: question

If you want password\r printed to the screen you need to do:

echo 'password\\r'

Note the use of the single-quotes (') rather than double quotes (") and the two back-slashes before the r.
Denver Osborn
Honored Contributor

Re: question

or w/out quotes...

echo password\\\\r


lnl
Occasional Advisor

Re: question

closed