From 216faa6e06fdec61066eb84bcd74f50e4f5e4a72 Mon Sep 17 00:00:00 2001 From: chan-hoo Date: Thu, 23 Sep 2021 16:49:24 +0000 Subject: [PATCH 1/2] Fix unbound SED --- ush/launch_FV3LAM_wflow.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ush/launch_FV3LAM_wflow.sh b/ush/launch_FV3LAM_wflow.sh index 72cdd74c7..510a173e3 100755 --- a/ush/launch_FV3LAM_wflow.sh +++ b/ush/launch_FV3LAM_wflow.sh @@ -405,7 +405,7 @@ launch script for this experiment: # CRONTAB_LINE with backslashes. Do this next. # crontab_line_esc_astr=$( printf "%s" "${CRONTAB_LINE}" | \ - $SED -r -e "s%[*]%\\\\*%g" ) + sed -r -e "s%[*]%\\\\*%g" ) # # In the string passed to the grep command below, we use the line start # and line end anchors ("^" and "$", respectively) to ensure that we on- From 3d05ed136fabc140c7c8db44f431d8db69722f15 Mon Sep 17 00:00:00 2001 From: chan-hoo Date: Wed, 6 Oct 2021 21:43:08 +0000 Subject: [PATCH 2/2] Add source_util_funcs to launch script --- ush/launch_FV3LAM_wflow.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ush/launch_FV3LAM_wflow.sh b/ush/launch_FV3LAM_wflow.sh index 510a173e3..fb2c71c96 100755 --- a/ush/launch_FV3LAM_wflow.sh +++ b/ush/launch_FV3LAM_wflow.sh @@ -25,6 +25,10 @@ else fi scrfunc_fn=$( basename "${scrfunc_fp}" ) scrfunc_dir=$( dirname "${scrfunc_fp}" ) + +ushdir="${scrfunc_dir}" +. $ushdir/source_util_funcs.sh + # #----------------------------------------------------------------------- # @@ -309,8 +313,8 @@ while read -r line; do # if [ $i -gt 0 ]; then im1=$((i-1)) - cycle_str[im1]=$( echo "$line" | sed -r -n -e "s/${regex_search}/\1/p" ) - cycle_status[im1]=$( echo "$line" | sed -r -n -e "s/${regex_search}/\2/p" ) + cycle_str[im1]=$( echo "$line" | $SED -r -n -e "s/${regex_search}/\1/p" ) + cycle_status[im1]=$( echo "$line" | $SED -r -n -e "s/${regex_search}/\2/p" ) fi i=$((i+1)) done <<< "${rocotostat_output}" @@ -405,7 +409,7 @@ launch script for this experiment: # CRONTAB_LINE with backslashes. Do this next. # crontab_line_esc_astr=$( printf "%s" "${CRONTAB_LINE}" | \ - sed -r -e "s%[*]%\\\\*%g" ) + $SED -r -e "s%[*]%\\\\*%g" ) # # In the string passed to the grep command below, we use the line start # and line end anchors ("^" and "$", respectively) to ensure that we on-