From d8cd628dddf9c2959cb10c8ab9f31ec1322dc0c7 Mon Sep 17 00:00:00 2001 From: Clemens Schwaighofer Date: Thu, 24 Oct 2024 13:57:04 +0900 Subject: [PATCH] Fix for check last login script the data reading was split with " " (space) which in the while read kept it as one row, changed the split character to "\n" --- bin/check_last_login.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/check_last_login.sh b/bin/check_last_login.sh index b624840..ae1987b 100755 --- a/bin/check_last_login.sh +++ b/bin/check_last_login.sh @@ -294,7 +294,7 @@ for ssh_group in "${ssh_groups[@]}"; do printf "${CSV_LINE}" "${account_id}" "${region}" "${instance_id}" "$(hostname)" "${username}" "${main_group}" "${ssh_group}" "${user_create_date_out}" "${account_age}" "${last_login_date}" "${last_login}" "${never_logged_in}" "${login_source}" "${out_string}" ;; esac; - done <<< "$(grep "${ssh_group}:" /etc/group | cut -d ":" -f 4 | sed -e 's/,/ /g')"; + done <<< "$(grep "${ssh_group}:" /etc/group | cut -d ":" -f 4 | sed -e 's/,/\n/g')"; done; if [ "${OUTPUT_TARGET}" = "text" ]; then if [ -n "${lock_accounts}" ]; then