sh Skeketon Script
#!/bin/sh# ............................................................................## License Which license (if any) covers this code?# Name /u01/dba/dir/script.ksh# Purpose What is the purpose of this script?# Usage How is this script normally executed?# Return 0 = Success, 1 = Fail# Parameters 0 = No, 1 = Yes## Who Allows initials to be used in History below## HISTORY# Ver Date Name Comments# ----- ----------- ---- --------------------# 1.0.0 13-May-2013 XXX Created## ............................................................................# ----------------------------------------------------------------------------
if [ $1 ]then ARG=$1else ARG=0fi
VERSION="01.00.00 (13-May-2013 Build 1)"TITLE="Title of this script [ARG ${ARG}]"SNAME=$(basename $0)
# ################################################ -----------------------------------------------# Name: showbanner# Desc: Show Banner# -----------------------------------------------
function showbanner{ echo "==============================================================================" echo "${SNAME} version ${VERSION}" echo "${TITLE}" echo "=============================================================================="}
# ################################################ -----------------------------------------------# Name: oradbenv# Desc: Inherit Environment# -----------------------------------------------
function oradbenv{ cd /home/${USER}
. /etc/profile
if [ -a .profile ] then . ./.profile fi
if [ -a .kshrc ] then . ./.profile fi}
# ################################################ -----------------------------------------------# Name: Main# Desc: Show Banner and set environment# -----------------------------------------------
showbanneroradbenv
exit 0
# EOF
if [ $1 ]then ARG=$1else ARG=0fi
VERSION="01.00.00 (13-May-2013 Build 1)"TITLE="Title of this script [ARG ${ARG}]"SNAME=$(basename $0)
# ################################################ -----------------------------------------------# Name: showbanner# Desc: Show Banner# -----------------------------------------------
function showbanner{ echo "==============================================================================" echo "${SNAME} version ${VERSION}" echo "${TITLE}" echo "=============================================================================="}
# ################################################ -----------------------------------------------# Name: oradbenv# Desc: Inherit Environment# -----------------------------------------------
function oradbenv{ cd /home/${USER}
. /etc/profile
if [ -a .profile ] then . ./.profile fi
if [ -a .kshrc ] then . ./.profile fi}
# ################################################ -----------------------------------------------# Name: Main# Desc: Show Banner and set environment# -----------------------------------------------
showbanneroradbenv
exit 0
# EOF
Bibliography
Bibliography