From 3dd05606ca4714023124b579c648b991fc57af77 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Mon, 24 Feb 2020 07:06:15 +0100 Subject: [PATCH] Call it the received number of domains instead of the imported number as importing does only happen a bit later. Only show the number of invalid domains if there are invalid domains. Signed-off-by: DL6ER --- gravity.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gravity.sh b/gravity.sh index d09211c8..c421e832 100755 --- a/gravity.sh +++ b/gravity.sh @@ -431,7 +431,11 @@ parseList() { num_correct_lines="$(( num_target_lines-total_num ))" total_num="$num_target_lines" num_invalid="$(( num_lines-num_correct_lines ))" - echo " ${INFO} Imported ${num_correct_lines} of ${num_lines} domains, ${num_invalid} domains invalid" + if [[ "${num_invalid}" -eq 0 ]]; then + echo " ${INFO} Received ${num_lines} domains" + else + echo " ${INFO} Received ${num_lines} domains, ${num_invalid} domains invalid!" + fi # Display sample of invalid lines if we found some if [[ -n "${incorrect_lines}" ]]; then