Echo/

D

David Trimboli

I'm curious as to why adding a slash after the echo command seems to be
popular around here. Are there any good reasons to use it?

David
Stardate 3823.7
 
R

Ray at

Hmm, I've never seen that, and since I don't have an answer, I probably
shouldn't reply. But I have a thought, anyway. It seems that echo/ just
echos a blank line. I've always used echo. to echo a blank line. I wonder
if there's a difference.

Ray at work
 
D

David Trimboli

Er, well, I'm not just talking about blank lines. The following three
commands seem to yield identical results:

echo Hello
echo/Hello
echo.Hello

I've seen the second form used a lot on this group, and I was wondering if
there was a particular reason. Is there some situation in which it becomes
important, or is it some issue of readability?

David
Stardate 3823.7
 
A

Austin M. Horst

ECHO/
ECHO\
ECHO[
ECHO]
ECHO+
ECHO=
ECHO.
ECHO,

All do the same thing.
Use any of the characters to echo 'spaces'

-or-

If you need to echo the word ON" or "OFF"
You must use one of the characters.

Simply typing ECHO ON would turn command echoing on.
Typing ECHO OFF would turn command echoing off.

However,

ECHO. ON outputs the word ON
ECHO. OFF outputs the word OFF

Open the command prompt and try it to see the results.

Austin M. Horst
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top