Echo/

  • Thread starter Thread starter David Trimboli
  • Start date Start date
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
 
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
 
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
 
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
 
Back
Top