Linux script instance while, linux script while

Source: Internet
Author: User

Linux script instance while, linux script while

Write a script. After the script is executed, print a row with the prompt "Please input a number:". Ask the user to enter a value, then print the value, and then ask the user to enter a value again. Until the user enters "end" to stop



Note: 1. unset Num can or cannot be used. unset is used to cancel variable settings to prevent the impact of previous values on the script program.

2. Note that there is a space between the if statement and the condition. There must be a space between the condition and the brackets on both sides.

3. Do not wrap echo-n automatically


Running result:


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.