Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

New Oddity with ECHO command

Jun
760
16
What is going on here? The first command ends with the ampersand; the second one has a space after it (and produces the expected result.

TCC(30.00.22): C:\>echo &
The process ID is 20296

TCC(30.00.22): C:\>echo &
ECHO is OFF

I discovered this while using SETDOS to turn off multiple command processing so that I could echo the ampersand character.

TCC(30.00.22): C:\>setdos /x-56

TCC(30.00.22): C:\>echo &
The process ID is 19236

The problem occurs only when the ampersand is the last character on the line and has no characters other than space before it.

TCC(30.00.22): C:\>echo .&
.&

Does anyone else see this, or is something messed up on my computer? It feels like something new, but I don't know why I would have entered the command echo & before.
 
Thank you, Vince! I'm not a Unix user, so this did not come to mind.
 
Back
Top