From 4410d932eb04bf747905a4b2db4cc2d54f7498f5 Mon Sep 17 00:00:00 2001 From: "Walter.Kolczynski" Date: Sun, 12 Feb 2023 23:48:21 -0600 Subject: [PATCH] Fix syntax error with pattern matching Corrects a syntax error with bash pattern matching, which does not work in single square braces. Refs: #1298 --- ush/forecast_predet.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ush/forecast_predet.sh b/ush/forecast_predet.sh index c2c8413eea..ae36d566a5 100755 --- a/ush/forecast_predet.sh +++ b/ush/forecast_predet.sh @@ -282,7 +282,7 @@ FV3_GFS_predet(){ WW3_predet(){ echo "SUB ${FUNCNAME[0]}: Defining variables for WW3" - if [ $CDUMP =~ "gdas" ]; then + if [[ $CDUMP =~ "gdas" ]]; then export RSTDIR_WAVE=$ROTDIR/${CDUMP}.${PDY}/${cyc}/wave/restart else export RSTDIR_WAVE=${RSTDIR_WAVE:-$ROTDIR/${CDUMP}.${PDY}/${cyc}/wave/restart}