From 37f9f4429d74bf54396cefd20686caddda6ca0d8 Mon Sep 17 00:00:00 2001 From: Clemens Schwaighofer Date: Wed, 2 Nov 2022 15:16:22 +0900 Subject: [PATCH] check users do not show delete from group if nothing has to be done --- bin/check_last_login.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/check_last_login.sh b/bin/check_last_login.sh index f361389..19cee05 100755 --- a/bin/check_last_login.sh +++ b/bin/check_last_login.sh @@ -73,8 +73,10 @@ for user in $(cat /etc/group|grep "${ssh_group}:" | cut -d ":" -f 4 | sed -e 's/ fi; printf "* Checking user %-20s: %s\n" "${user}" "${out_string}"; done; -echo "--------------------->" -echo ${delete_accounts}; +if [ ! -z "${delete_accounts}" ]; then + echo "--------------------->" + echo ${delete_accounts}; +fi; echo "[END] ===============>" # __END__