Exercise: Functions

Put to practice what we have learned about functions.

Exercise

Write the following functions for printing error messages in English and German:

  • print_error
  • code_to_error_en
  • code_to_error_de

Write two versions of the “code_to_error” function:

  • Using the case statement in print-error-local.sh file.
  • Using an associative array in print-error-array.sh file.

Get hands-on with 1400+ tech skills courses.