Skip to content

Commit

Permalink
cat pgmerr to logfile
Browse files Browse the repository at this point in the history
  • Loading branch information
chan-hoo committed May 9, 2023
1 parent 0568cc2 commit c400d67
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ush/job_preamble.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ if [ "${RUN_ENVIR}" = "nco" ]; then
export pgmerr="${DATA}/errfile"
export REDIRECT_OUT_ERR=">>${pgmout} 2>${pgmerr}"
export pgmout_lines=1
export pgmerr_lines=1

function PREP_STEP() {
export pgm="$(basename ${0})"
Expand All @@ -94,6 +95,11 @@ if [ "${RUN_ENVIR}" = "nco" ]; then
pgmout_line=$( wc -l $pgmout )
pgmout_lines=$((pgmout_lines + 1))
fi
if [ -f $pgmerr ]; then
tail -n +${pgmerr_lines} $pgmerr
pgmerr_line=$( wc -l $pgmerr )
pgmerr_lines=$((pgmerr_lines + 1))
fi
}
else
export pgmout=
Expand Down

0 comments on commit c400d67

Please sign in to comment.