Hi Folks -
To make a long story short, this script is loaded into a workbench, executed via workbench user interface, and then I need to display the output on screen. However, I'm using the functions to direct stdout and stderror to their respective directories.
Is there a way to turn that off so I can leverage the cat command? Else, when I place my cat commands just prior to the exits, it doesn't work.
Here is my script:
#!/bin/bash
#::------------------------------------------------------------------------
#::-- Script Name: FDMEE_Act_Load.sh
#::
#::-- Description: This Script Executes the FDMEE RunBatch Utility
#::
#::-- Paramaters: Call setenv.sh to determine the following:
#:: 1. Login
#:: 2. Password
#:: 3. Server
#:: 4. Application
#:: 5. Database
#:: 6. etc
#::
#::-- Author:
#::-- Date:
#:: ------------------------------------------------------------------------
source /app/hyp_app/scripts/setenv.sh
#::-- Set Script Name --::#
_SN=${0##*/}
echo Script Name: ${_SN}
#::-- Script Name w/o EXT: ${_SN%%.sh*} --::#
#::-- Set Log & Error Files --::#
_INTRA_PATH=${_FDMEE_LOG_DIR}
_ERROR_INTRA_PATH=${_FDMEE_ERROR_DIR}
_LOGFILE=${_INTRA_PATH}/${_DATETIMESTAMP}_${_SN%%.sh*}.log
_ERRORFILE=${_ERROR_INTRA_PATH}/${_DATETIMESTAMP}_${_SN%%.sh*}.err
echo ${_LOGFILE}
#::-- Direct STDOUT and STDERROR to repositories --::#
exec 2>${_ERRORFILE} > ${_LOGFILE}
#::-- Begin Script Processing --::#
echo ------------------------------------------
echo ${_SN} Starting at ${_TIME}
echo ------------------------------------------
echo ------------------------------------------
echo Execute FDMEE Actuals Load
echo ------------------------------------------
. ${_FDMEE_UTIL_DIR}/runbatch.sh $APPID -f:${_FDMEE_APP_PSWRD} ${_FDMEE_BATCH}
if [ $? -eq 0 ]
then
echo ------------------------------------------
echo ${_SN%%.sh*} - Completed Successfully
echo ------------------------------------------
echo ------------------------------------------
echo Script Process Exiting Normally
echo ------------------------------------------
exit 0
else
echo ------------------------------------------
echo ${_SN%%.sh*} - Completed Unsuccessfully
echo ------------------------------------------
echo ------------------------------------------
echo Script Process Exiting Abnormally
echo ------------------------------------------
exit 1
fi
Thank you!