Skip to content

Commit

Permalink
Define LOG_ERR earlier
Browse files Browse the repository at this point in the history
  • Loading branch information
vkucera committed Oct 4, 2024
1 parent 9b88605 commit fcca066
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion machine_learning_hep/submit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ DIR_THIS="$(dirname "$(realpath "$0")")" # This directory
DBDIR="data/data_run3"
DB_DEFAULT="${DIR_THIS}/${DBDIR}/database_ml_parameters_${DATABASE}.yml"
LOG="log_${STAGE}_${DATABASE}_${ANALYSIS}.log"
LOG_ERR="${LOG/.log/_err.log}"

##### Execution

Expand All @@ -56,7 +57,6 @@ else
${CMD_ANA} > "${LOG}" 2>&1
fi || echo "Error"

LOG_ERR="${LOG/.log/_err.log}"
echo "Grepping issues into ${LOG_ERR}"
grep -e "Error in " -e "Failed " "${LOG}" > "${LOG_ERR}"
grep -A 1 -e WARN -e ERROR -e FATAL -e CRITICAL "${LOG}" >> "${LOG_ERR}"
Expand Down

0 comments on commit fcca066

Please sign in to comment.