diff --git a/dabo/functions/get_range.sh b/dabo/functions/get_range.sh index b38536d..9d4431a 100644 --- a/dabo/functions/get_range.sh +++ b/dabo/functions/get_range.sh @@ -14,7 +14,7 @@ function get_range { local f_range_data=$(grep "^${f_range_day}" ${f_hist_file} | cut -d , -f2 | grep "^[0-9]") # Check for new range - local f_last_range_day=$(tail -n1 ${f_hist_file} | cut -d, -f24) + 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} then g_echo_note "${FUNCNAME} $@: No new range"