From c3fdf58666581db449a4a6ae5fc63484c5ab4ad0 Mon Sep 17 00:00:00 2001 From: Patrick Van der Veken Date: Mon, 11 Jan 2021 15:52:32 +0100 Subject: [PATCH] ksh88 fix --- manage_ssh.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/manage_ssh.sh b/manage_ssh.sh index fab3744..d6c8d1a 100644 --- a/manage_ssh.sh +++ b/manage_ssh.sh @@ -43,7 +43,7 @@ # or LOCAL_CONFIG_FILE instead # define the version (YYYY-MM-DD) -typeset -r SCRIPT_VERSION="2021-01-09" +typeset -r SCRIPT_VERSION="2021-01-11" # name of the global configuration file (script) typeset -r GLOBAL_CONFIG_FILE="manage_ssh.conf" # name of the local configuration file (script) @@ -1179,7 +1179,8 @@ then fi # expand alias line into individual aliases -for ALIAS in ${ALIASES_LINE//,/ } +# do not use variable substition (>=ksh93) instead use the uglier 'tr' solution +for ALIAS in $(print "${ALIASES_LINE}" | tr ',' ' ' 2>/dev/null) do # recurse if the alias is a group IS_ALIAS=$(print "${ALIAS}" | grep -c -E -e '^\@' 2>/dev/null)