I'm new to UE, and I've come across a problem with code folding/syntax highlighting in my bash script.
UE isn't associating the first "if" with the last "fi", and I think I see why altho I don't know how to fix it.
My code has several "echo" statements that contain the word "if", and these seem to be confusing UE.
any way to fix this?
here's the Fold Strings piece from my bash uew file;
and here's the piece of bash script that's having the problem;
UE isn't associating the first "if" with the last "fi", and I think I see why altho I don't know how to fix it.
My code has several "echo" statements that contain the word "if", and these seem to be confusing UE.
any way to fix this?
here's the Fold Strings piece from my bash uew file;
Code: Select all
/Open Fold Strings = "{" "if" "elif" "do"
/Close Fold Strings = "}" "elif" "fi" "done"
Code: Select all
if [[ ! -f "${RDBR_KSH_Script}" || -z "${RDBR_KSH_Script}" ]];
then
case "${product}" in
"Oracle")
RDBR_KSH_Script=/scm/pvcs/scripts/Database/Common/run_oradb_change.sh;
;;
*)
summary=$(
echo -e "\n#################### auto_db_load - RDBR KSH Product file entry is ABSENT - Aborted ####################\n";
echo -e "Error: No entry in Master config file for Products RDBR KSH shell file. Exiting with exit_code=173.";
echo -e " OR: Please check if the file has read permission if entry exist in the Master configuration file.";
echo -e " OR: User interrupted the script while MKDIR operation was in progress in progres.";
echo -e "\n\nMaster config file : \"${mcfile}\"";
echo -e "RDBR_KSH_Script was set to : \"${RDBR_KSH_Script}\"";
echo -e "Product was set to : \"${product}\"\n";);
echo "${summary}" | tee -a "${LOG_FILE}";
exit_code=173; kill -15 $$;
;;
esac
else
##-r on file readability test was acting up, so used cat command.
cat "${RDBR_KSH_Script}" 1>/dev/null 2>&1;
ReturnCode=$?;
if [[ ${ReturnCode} -ne 0 ]];
then
summary=$(
echo -e "\n#################### auto_db_load - RDBR KSH Product file is not readable - Aborted ####################\n";
echo -e "Error: RDBR KSH Shell file is not readable. Exiting with exit_code=174.";
echo -e " OR: Please check if the file has read permission for user running this automation script.";
echo -e " OR: User interrupted the script while MKDIR operation was in progress in progres.";
echo -e "\n\nRDBR_KSH_Script was set to : \"${RDBR_KSH_Script}\"";
echo -e "Product was set to : \"${product}\"\n";);
echo "${summary}" | tee -a "${LOG_FILE}";
exit_code=174; kill -15 $$;
fi
fi