diff --git a/jobs/JGLOBAL_FORECAST b/jobs/JGLOBAL_FORECAST index 69366fd866..e64a91d21c 100755 --- a/jobs/JGLOBAL_FORECAST +++ b/jobs/JGLOBAL_FORECAST @@ -123,7 +123,7 @@ if [[ "${KEEPDATA}" == "NO" ]]; then # Determine if this is the last segment commas="${FCST_SEGMENTS//[^,]}" n_segs=${#commas} - if (( n_segs - 1 == ${FCST_SEGMENT:0} )); then + if (( n_segs - 1 == ${FCST_SEGMENT:-0} )); then # Only delete temporary restarts if it is the last segment rm -rf "${DATArestart}" fi