From b2722e6b196cd80fa9916cf5c665cd9b81b9068d Mon Sep 17 00:00:00 2001 From: Victor Engmark Date: Sat, 17 Nov 2018 07:10:25 +1300 Subject: [PATCH] Avoid globbing and word splitting when expanding variables --- scripts/texttobase64.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/texttobase64.sh b/scripts/texttobase64.sh index d23b17c..271060d 100755 --- a/scripts/texttobase64.sh +++ b/scripts/texttobase64.sh @@ -8,8 +8,8 @@ do firstChar="${line:0:1}" if [[ "$firstChar" != "$commentChar" ]] && [[ -n "$firstChar" ]] then - echo -n $line | base64 + echo -n "$line" | base64 else - echo $line + echo "$line" fi done