#!/bin/bash
set -o nounset # treat unset variables as an error when substituting
set -o errexit # exit immediately if a command exits with a non-zero status
set -o pipefail # the return value of a pipeline is the status of
# the last command to exit with a non-zero status,
# or zero if no command exited with a non-zero status
set -o errexit # exit immediately if a command exits with a non-zero status
function print_error {