Skip to content

Commit

Permalink
Fix syntax error with pattern matching
Browse files Browse the repository at this point in the history
Corrects a syntax error with bash pattern matching, which does
not work in single square braces.

Refs: #1298
  • Loading branch information
WalterKolczynski-NOAA committed Feb 13, 2023
1 parent 73786ca commit 4410d93
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ush/forecast_predet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit 4410d93

Please sign in to comment.