Programming experience: Several batch processing statements just concluded

Source: Internet
Author: User

I want to know which hosts are alive in a CIDR block, and I am too tired to use the ping255 machines.

For/L % I in (255,) Do ping 192.168.0.% I-l 1-N 1> result.txt
Ping 192.168.0.% I-l 1-N 1 255 and output the result to the result.txt File

Find "bytes = 1" "result.txt"
Find the rows with Bytes = 1 in the result.txt file and print them to the screen. Because the previous Ping specifies-L 1, the successful machine will have rows with Bytes = 1, only the result of request timeout is returned.

I remember when I was a child, I once spoke a lot before I learned programming. I used C ++ to do the same thing with batch processing!

It's so arrogant when you are young, but now it's possible that you can use rundll32 to call winapi and execute loops and judgments to implement simplicity.ProgramNow

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.