Batching: The use of Echo

Source: Internet
Author: User
Tags echo command

Batching: The use of Echo

To display a command with the echo command, use the following syntax: echo [message]

Parameter on| OFF
Specifies whether to allow echo of the command. To display the current echo settings, you can use the echo with no 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: Each line of command execution will be wrapped and then executed by the next command.

1.echo on this command is displayed unless you add the @ sign at the beginning to hide the current line's command (this line). The function of this command is to set the Allow command to echo.

2.echo 123 because the Allow command echo is set, the command Echo 123 is displayed first and then the command is executed to display 123 .

3.echo off this command displays unless the @ symbol is added to hide the current line's command. The function of this command is to set not to allow the command to echo.

4.echo 123 because the command echo is not allowed, the command is executed directly (without displaying the command), which displays the 123

5.echo on because the command echo is not allowed, direct execution of the command allows the command to echo

6.echo 234 because the Allow command echo is set, the command Echo 234 is displayed first , and then the command line is executed to display 234

7. ::echo off is a function of annotations (also available in REM instead, semicolon ; no), so don't worry about it .

8.echo 333 function with 6

9.echo on because the Allow command echo is set, the command is displayed first, and then the command is executed (of course, the echo command has been turned on before, so this superfluous, hehe)

10.pause because the Allow command echo is set, pause is displayed first, and then the

11.echo off because the Allow command echo is set, the echo off is displayed first and then the setting does not allow the command to Echo

12.pause because the setting does not allow the command to echo, so the direct execution

Batching: The use of Echo

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.