Skip to content

Instantly share code, notes, and snippets.

@chiita
Last active September 24, 2015 14:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chiita/4640173b0959625f9855 to your computer and use it in GitHub Desktop.
Save chiita/4640173b0959625f9855 to your computer and use it in GitHub Desktop.
shell template
#!/bin/bash
###############################################################################
# <概要>
#
#
# <引数>
#
#
#
#
###############################################################################
# Ruler 1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
#*-------------------------------------<< comment >>--------------------------*
#*-------------------------------------<< 環境設定 >>-------------------------*
YYYYMMDD=$(date +%Y%m%d)
SHELL=$(basename $0 .sh)
LOGFILE=/var/log/shell/${SHELL}_${YYYYMMDD}.log
#exec > >(tee -a ${LOGFILE})
exec >> "${LOGFILE}"
exec 2>&1
echo "
*-----------------------------------------------------------------------------*
*----------------------------<< ${SHELL}.sh >> 【開始】 $(date +%Y-%m-%d) $(date +%T)
*-----------------------------------------------------------------------------*
"
#!/bin/bash
###############################################################################
# <概要>
#
#
# <引数>
#
#
#
#
###############################################################################
# Ruler 1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
#*-------------------------------------<< comment >>--------------------------*
#*-------------------------------------<< 環境設定 >>-------------------------*
#*-------------------------------------<< フッター >>-------------------------*
. ./header.sh
#*-------------------------------------<< メイン処理 >>-----------------------*
#*-------------------------------------<< フッター >>-------------------------*
. ./footer.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment