First two days of shell scripting... I've looked at awk/sed and man sed only to get off into the weeds of complexity that may not be needed here...
hints for awk or sed or other method to magically change the bolded item below?
Nutshell: HFTST=Y #test mode = true to false & back again so script remains default test mode = true; ref #magically toggles... I may run another pre-emptive script to always toggle to Y in case DTTRProc errors and doesn't reset automagically
First six lines of MCSB475CA.dat parmater file for INT0013CA shell script
# [HEADER]
HFTST=Y
HFTPP=000000107
HFTPP=000000040
# [DETAIL]
HCCLM=HIC
....
Section of DTRRProc shell script file as wrapper to locate oldest $i file process & move to archive folder as well as retrieve output files created by INT0013CA
tMode()
{
#magically toggles HFTST=[Y,N] in MCSB475CA.dat file
}
HSTST=
if [[ $2 >/dev/null ]];then
case $2 in
"N")
HSTST=$2
tMode $HSTST
;;
*) HSTST=Y
tMode $HSTST
;;
esac
fi
#call shell script that wiill use MCSB475CA.dat as parameter file
...$i is a path & file to process
INT0013CA $i>>DTRR_Log
...
#toggle back to test mode
HSTST=Y
tMode $HSTST