Skip to content
KALANBLON
Show contents

Chapter 3 of 7 · 10 min

Quiz: understanding the system

Processes, signals, awk and sed: check that you master the administrator's basic tools. You need 70% correct answers to pass this quiz.

Quiz

7 questions · pass mark: 70%

  1. 1.Which command politely asks a process to stop, giving it time to clean up?

    One answer

  2. 2.A process killed by SIGTERM (signal 15): which exit status does wait return?

    One answer

  3. 3.Complete to delete the temporary file at every end of the script, normal or on error.

    Complete the code

    tmp=$(mktemp)
    trap 'rm -f "$tmp"' ____
  4. 4.What does $! hold right after the command sleep 30 & ?

    One answer

  5. 5.What does awk '$4 == 500 { print $3 }' access.log do?

    One answer

  6. 6.On a CSV file (comma-separated values), awk '{ print $2 }' prints empty lines. Why?

    One answer

  7. 7.Which statements about sed and awk are correct? (several answers)

    Several answers possible

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