From ee54dbc1ccc7a0115cf132b10610207df9b353ee Mon Sep 17 00:00:00 2001 From: DavidHuber Date: Tue, 24 Oct 2023 16:36:43 +0000 Subject: [PATCH] Address lint-shell warnings. Refs #1460 --- scripts/exgdas_enkf_earc.sh | 4 ++-- scripts/exglobal_archive.sh | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/exgdas_enkf_earc.sh b/scripts/exgdas_enkf_earc.sh index d7530b844c..4be690be1f 100755 --- a/scripts/exgdas_enkf_earc.sh +++ b/scripts/exgdas_enkf_earc.sh @@ -134,12 +134,12 @@ if [ "${ENSGRP}" -eq 0 ]; then stat_chgrp=$? ${HSICMD} chmod 640 "${tar_fl}" stat_chgrp=$((stat_chgrp+$?)) - if [ "${stat_chgrp}" -gt 0 ]; then + if [[ "${stat_chgrp}" -gt 0 ]]; then echo "FATAL ERROR: Unable to properly restrict ${tar_fl}!" echo "Attempting to delete ${tar_fl}" ${HSICMD} rm "${tar_fl}" echo "Please verify that ${tar_fl} was deleted!" - exit ${stat_chgrp} + exit "${stat_chgrp}" fi fi diff --git a/scripts/exglobal_archive.sh b/scripts/exglobal_archive.sh index 57b8517b78..afab846986 100755 --- a/scripts/exglobal_archive.sh +++ b/scripts/exglobal_archive.sh @@ -292,7 +292,7 @@ if [[ ${HPSSARCH} = "YES" || ${LOCALARCH} = "YES" ]]; then echo "Attempting to delete ${tar_fl}" ${HSICMD} rm "${tar_fl}" echo "Please verify that ${tar_fl} was deleted!" - exit ${stat_chgrp} + exit "${stat_chgrp}" fi fi ;; @@ -300,8 +300,8 @@ if [[ ${HPSSARCH} = "YES" || ${LOCALARCH} = "YES" ]]; then esac # For safety, test if the htar/tar command failed after changing groups - if [ "${status}" -ne 0 ] && [ "${PDY}${cyc}" -ge "${firstday}" ]; then - echo "FATAL ERROR: ${TARCMD} ${PDY}${cyc} ${targrp}.tar failed" + if [[ "${status}" -ne 0 ]] && [[ "${PDY}${cyc}" -ge "${firstday}" ]]; then + echo "FATAL ERROR: ${TARCMD} ${tar_fl} failed" exit "${status}" fi set_strict