PROCNAME=`basename $0 | awk -F"." '{print $1}'`
Fills the variable PROCNAME with the basename (without path if existed), uses a dot as field seperator, and used the first part of the filename which was limited by dot/s.
export LOG_DT=`date '+20%y%m%d'`;
Fills and exports the variabe LOG_DT with the value of date, though should have used %Y
rather than 20%y
export LOG_TM=`date +'%H%M'`.log;
Similar as above but with time, and appending the .log
extension to the string.
export FCTN_LIB=${ARCH_BIN_DIR}/function_library.sh
Fills and exports the variable FCTN_LIB with the (undefiend) variable ARCH_BIN_DIR, and appending the filename function_library.sh.
. ${FCTN_LIB}
Sourcing the above defined file.
export LOG=${LOG_DIR}/${PROCNAME}.${LOG_DT}${LOG_TM}
Finaly the LOG variable gets filled and exported by appending the above strings together.
export PFILE=${PROCNAME}.ksh_param
Yet another PFILE variable, which is named the same as the script beeing executed, but having .ksh_param
extension, rather than what was originaly.
PGM=${PROCNAME}
Fill another variable with the basename without file extension to PGM.
clear
Clear the screen, not that anything was printed yet...
trap 'errhandle_se_je 1' 1 2 3 15
Trying to trap a function, which was not defined in the given code, while passing 1 2 3 15.
There seems an error, as the first 1 is inside the quote to the function, which probably will cause the function to fail, since its quote, and since there is a space inside the quotes.
A=${1:-0}
B=${2:-0}
C=${3:-0}
Filling variable A,B,C with the values of passed arguments 1,2,3 while cut off the 0 tailing chars.
D=${4:-30}
E=${5:-270}
Same as above, but cutting off 30 (D) or 270 (E) tailing chars (from the right!)
F="$CDD/${PROCNAME}_dups.bad
Fills the variable F
with undefiend variable CDD
as path and using PROCNAME
(not PGM
with the same content) and yet another file extension: .bad
.
Hope this helps to get you started