From d237cddf01c66a1b0ddf75524723c3e2b50f3610 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakobus=20Sch=C3=BCrz?= Date: Tue, 15 Dec 2020 13:13:39 +0100 Subject: [PATCH] change syntax --- functions.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/functions.sh b/functions.sh index b6451f2..1711740 100755 --- a/functions.sh +++ b/functions.sh @@ -355,8 +355,9 @@ sshs() { if [ -e "${HOME}/.config/myshellconfig/sshs_addfiles.conf" ] ; then for file in $(cat "${HOME}/.config/myshellconfig/sshs_addfiles.conf");do - echo "add $i to FILELIST" - FILELIST+=("$i") + [ -e "$file" ] && {\ + echo "add $file to FILELIST"; \ + FILELIST+=("$i"); } done fi local SSH_OPTS="-o VisualHostKey=no -o ControlMaster=auto -o ControlPersist=15s -o ControlPath=~/.ssh/ssh-%r@%h:%p"