Skip to content
KALANBLON
Show contents

Chapter 3 of 6 · 10 min

Quiz: writing solid scripts

Variables, conditions, loops, functions, exit codes and strict mode: let's check that you can write solid scripts. You need 70% correct answers, and every answer is explained.

Quiz

6 questions · pass mark: 70%

  1. 1.Which line correctly creates a variable?

    One answer

  2. 2.Which test correctly compares two numbers?

    One answer

  3. 3.What does set -e do at the start of a script?

    One answer

  4. 4.Why write "$file" rather than $file?

    One answer

  5. 5.Which exit code signals success?

    One answer

  6. 6.Fill in the keyword that declares a variable specific to a function.

    Complete the code

    backup() {
      _____ folder=$1
      ...
    }

Your progress is saved on this device. Create a free account to keep your progress on all your devices.