#!/bin/bash function PreflightCheck() { #Common things I check for in the scripts I write. #export curr_host="$(hostname)" #export curr_user="$USER" #export host_check="$(echo $curr_host | grep -c )" #export user_check="$(echo $curr_user | grep -c )" #if [ $host_check -ne 1 ]; then # echo "Must run on ." # error_out #fi #if [ $user_check -ne 1 ]; then # echo "Must run as ." # error_out #fi #if [ "$ARG_COUNT" -ne ]; then # help # error_out #fi #Your additional stuff here... echo "All checks passed...." }