From ec158b2c623f65430188c3450c62888a33032d9d Mon Sep 17 00:00:00 2001 From: Patrick Van der Veken Date: Mon, 11 Jan 2021 16:03:35 +0100 Subject: [PATCH] whitespace fix --- manage_ssh.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/manage_ssh.sh b/manage_ssh.sh index d6c8d1a..54bd504 100644 --- a/manage_ssh.sh +++ b/manage_ssh.sh @@ -1179,8 +1179,9 @@ then fi # expand alias line into individual aliases -# do not use variable substition (>=ksh93) instead use the uglier 'tr' solution -for ALIAS in $(print "${ALIASES_LINE}" | tr ',' ' ' 2>/dev/null) +# do not use variable substition (>=ksh93) instead use the uglier while loop solution +# (hint: don't use a for loop as aliases may contain spaces!) +print "${ALIASES_LINE}"| while IFS=',' read -r ALIAS do # recurse if the alias is a group IS_ALIAS=$(print "${ALIAS}" | grep -c -E -e '^\@' 2>/dev/null)