Saturday, January 4, 2020

bash script template

#//////////////////////////////////////////////////////////////////////
#!/bin/bash
#//////////////////////////////////////////////////////////////////////
#----------------------------------------------------------------------
#
# scriptName -- description
#
#----------------------------------------------------------------------
#//////////////////////////////////////////////////////////////////////
# PATH AND NAME FOR FRIENDLY USE
#//////////////////////////////////////////////////////////////////////
#----------------------------------------------------------------------
_path=$0
_name="${_path##*/}"
#----------------------------------------------------------------------
#//////////////////////////////////////////////////////////////////////
# FUNCTIONS
#//////////////////////////////////////////////////////////////////////
#----------------------------------------------------------------------
#fxn() {

  # function

#}
#----------------------------------------------------------------------
#//////////////////////////////////////////////////////////////////////
# INTERNAL AFFAIRS
#//////////////////////////////////////////////////////////////////////
#----------------------------------------------------------------------

if [ $BASH_SOURCE = "$_path" ] ; then  # script called directly

  # this is what happens when you call the script directly

fi

#----------------------------------------------------------------------
#//////////////////////////////////////////////////////////////////////
# END OF script — 190315.1547
#//////////////////////////////////////////////////////////////////////