Echo on | off

Source: Internet
Author: User
Tags echo command

If you want to use the echo command to display a command, you can use the following syntax: Echo [Message]

Parameter on | off
Specifies whether to allow command echo. To display the current echo settings, you can use echo without parameters.
Command.

 

The following code:

Echo on
Echo 123
Echo off
Echo 123
Echo on
Echo 234
: Echo off
Echo 333
Echo on
Pause
Echo off
Pause

 

Note: after each line of commands is executed, the line breaks and the next command is executed again.

1. The echo on command is displayed, unless the @ symbol is added at the beginning to hide the command of the current line (this line ). This command is used to allow command echo.

2. Because echo 123 is set to allow command echo, the echo 123 command is displayed first and then the line feed command is executed to display 123

3. The echo off command is displayed unless the @ symbol is added to hide the command of the current line. This command is used to set whether to allow command echo.

4. Because echo 123 is set to prohibit command echo, directly execute the command (without displaying the command), that is, display 123

5. Because echo on is set to prohibit command Echo, you can directly execute the command to allow command echo.

6. Because echo 234 allows command echo, Echo 234 is displayed first, and a line feed is run to display echo 234.

7.::Echo off is used for annotation (also can be replaced by REM, semicolon; no), so you don't have to worry about it.

8. Echo 333 works the same as 6

9. Because echo on allows command ECHO, the command is displayed first and then executed (of course, the echo command has been enabled before, so this is redundant)

10. Because pause allows command echo, it displays pause first and then runs

11. Because echo off is set to allow command echo, echo off is displayed first, and the command ECHO not allowed is executed.

12. Since the pause settings do not allow command echo, directly execute

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.