Files
shell-scripting-templates/lib/sharedVariables.sh
Nathaniel Landau 238f27e581 New script template
2015-01-07 22:59:39 -05:00

33 lines
1.0 KiB
Bash
Executable File

#!/usr/bin/env bash
# ##################################################
# Shared bash functions used by my bash scripts.
#
# VERSION 1.0.0
#
# HISTORY
#
# * 2015-01-02 - v1.0.0 - First Creation
#
# ##################################################
# SCRIPTNAME
# ------------------------------------------------------
# Will return the name of the script being run
# ------------------------------------------------------
scriptName=`basename $0` #Set Script Name variable
scriptBasename="$(basename ${scriptName} .sh)" # Strips '.sh' from scriptName
# NOW
# ------------------------------------------------------
# Will print the current date and time in the format:
# 01-02-2015 01:09:54 PM
# ------------------------------------------------------
now=$(date +"%m-%d-%Y %r") #Set Timestamp in variable
# THISHOST
# ------------------------------------------------------
# Will print the current hostname of the computer the script
# is being run on.
# ------------------------------------------------------
thisHost=$(hostname)