#!/usr/bin/env bash
# exit if a command fails
set -o errexit
# display last non-zero exit code in a failed pipeline
set -o pipefail
# exit if required variables are not set
set -o nounset
# make sure the correct number of arguments are passed; if not, output syntax and exit
if [ "$#" -ne 2 ]; then
echo -e "\\nUsage: $0