Compile a Unix shell program

Source: Internet
Author: User

CCID Continuing Education Students compile Unix shell program Examination
1. What are the advantages of using functions in shell scripts? Which of the following is not correct. B
A. They are faster than separate commands.
B. They can execute recursive code.
C. They can store the values that will be used in the script later.
D. They organize shell scripts into smaller and easier-to-manage modules.
2. How do I change the default prompt for using the SELECT command? A
A. Set the PS3 variable
B. Specify the echo statement before the SELECT command
C. New value assigned to the prompt variable
D. Use Case to build the menu item and rewrite the prompt.
3. When should I use the case command instead of the IF THEN or Elif command? A
A. When comparing a single value with multiple values
B. Check if the value is incorrect.
C. When creating a loop
D. When setting the format
4. Which type of statements can you use to create an iteration loop? This loop will be terminated only when you enter a special value? D
A. Echo... Read
B. Print... Read
C. If... Else
D. While... Do
5. What is the role of the trap command? B
A. Terminate the script under specified conditions
B. Run a command under specified conditions
C. display the variable value
D. prevent repeated logic loops of scripts
6. Which of the following statements describe variables most accurately? C
A. Keep the value unchanged in the program
B. Number of repeated use in the program
C. The name used to access the storage area
D. All text and digital data that are not keywords
7. How does the echo statement help you debug the script? C
A. display the script Input
B. Display error messages
C. display the values of variables and parameters
D. display the exit status of each command
8. Which of the following script elements can improve the readability of the script? A
A. Notes
B. Loop content
C. Variable Declaration
9. Which syntax do you use to make the file executable? B
A./EXE filename1 filename2... Filenamen
B../EXE filename1 filename2... Filenamen
C. EXE filename1 filename2... Filenamen
10. Which command can you use to generate a menu in the Korn shell? D
A. Case
B. Do... Done
C. If... Else
D. Select

Your score for this test is 9 correct questions. Pass the test

Question 8 may be B.

 

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.