diff --git a/scripts/texttobase64.sh b/scripts/texttobase64.sh index e094ee5..4093a89 100755 --- a/scripts/texttobase64.sh +++ b/scripts/texttobase64.sh @@ -1,9 +1,11 @@ commentChar="#" -while read p; do +while read p +do firstChar=${p:0:1} - if [[ "$firstChar" != "$commentChar" && "$firstChar" != "" ]] ; then - echo -n $p | base64; + if [[ "$firstChar" != "$commentChar" && "$firstChar" != "" ]] + then + echo -n $p | base64 else - echo $p; + echo $p fi done