![]() | Red Hat Certified System Administration 8 |
Quizz 01Question 1How do you stop a script to allow a user to provide input? a. pauseb. break c. read d. stop C. The read statement stops a script, which allows a user to provide input. If read is used with a variable name as its argument, the user input is stored in this variable. Question 2Which line stores the value of the first argument that was provided when starting a script in the variable NAME? a. NAME = $1b. $1 = NAME c. NAME = $@ d. NAME=$1 D. The first argument is referred to as $1. To store $1 in a variable with the name NAME, use the command NAME=$1. Make sure that no spaces are included, which is why answer A is incorrect. Question 3What is missing in the following script at the position of the dots? b. do c. run d. start B. After stating the condition in a for loop, do is used to start the commands that need to be started when the condition is true. Question 4Question 5Question 6+ Correction |