#!/bin/bash check_and_exit() { if [ $? -eq 0 ]; then echo $1 exit 0 else echo $2 exit 1 fi } validate_script() { if [ ! -f "$1/$1.sh" ]; then echo "'$1' cannot be globalized" exit 1 fi } main() { while getopts "?h?l?r?" opt; do case $opt in h) echo "Usage: $0 [-l|-r]