IT 244: Introduction to Linux/Unix
Class 23 Ungraded Quiz

  1. What do [ and ] mean when used in an if statement?


  2. What are the keywords used to mark a block of commands in an if ... then statement?


  3. What are the keywords used to mark the FIRST block of commands in an if ... then ... else statement?


  4. What are the keywords used to mark the SECOND block of commands in an if ... then ... else statement?


  5. What are the keywords used to mark the block of commands following elif?


  6. Is there any limit to the number of blocks of commands you can have in an if ... elif ... else statement?


  7. How would you run the script do_something.sh if you wanted to print each line of the script before it was executed?


  8. If you were debugging a script as in the example above, how would Bash mark the lines of the script itself to distinguish them from the output of the script?


  9. What has to follow each elif in an if ... elif ... else statement?


  10. How does the test command indicate that the logical expression it is evaluating is true?