Use of echo off and Echo on in DOS

Source: Internet
Author: User

In DOS, you will often see the. bat (Batch) file at the beginning of the @echo off command

echo off indicates that only the results are displayed while the batch file is executing, not the commands executed:

For example, to create a test.bat file, copy the following code:

echo aaaaaaaaaaa
echo bbbbbbbbbbb
echo off
echo aaaaaaaaaaa
echo bbbbbbbbbbb
echo on
Echo Aaaaaaaaaaa
echo bbbbbbbbbbb
Pause  

Put it on the desktop and run as follows:


You can see that each command of a batch is displayed on the command line before echo off is executed, and after echo off is performed, only the results of the execution are displayed.

Here, echo on is clearly the opposite of echo off


Reference Address: http://network.51cto.com/art/201009/225457.htm


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.