diff --git a/dabo/functions/get_range.sh b/dabo/functions/get_range.sh index 9d4431a..eff30b3 100644 --- a/dabo/functions/get_range.sh +++ b/dabo/functions/get_range.sh @@ -15,10 +15,13 @@ function get_range { # Check for new range local f_last_range_day=$(tail -n2 ${f_hist_file} | head -n1 | cut -d, -f24) - if echo "${f_latest_date}" | grep -q ${f_last_range_day} + if [ -n "${f_last_range_day}" ] then - g_echo_note "${FUNCNAME} $@: No new range" - return 1 + if echo "${f_range_day}" | grep -q "${f_last_range_day}" + then + g_echo_note "${FUNCNAME} $@: No new range" + return 1 + fi fi if [ -n "${f_range_data}" ]