From 304d4863d1034ea6fb0d5850fd4a3de6c52693fe Mon Sep 17 00:00:00 2001 From: "Archie Hilton (thytom)" Date: Fri, 25 Oct 2019 11:42:13 +0100 Subject: [PATCH] Quoted all variables, to avoid whitespace truncation. --- bar.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bar.sh b/bar.sh index 63bff6f..1055177 100755 --- a/bar.sh +++ b/bar.sh @@ -40,8 +40,8 @@ get_bar() { for module in $MODULES; do if [[ $INTERNET -eq 0 ]] || [[ $ONLINE_MODULES != *"$module"* ]];then - module_out=$(cat $OUTPUT_CACHE$module | sed 's/\.$//g') - bar=$bar$module_out + module_out="$(cat $OUTPUT_CACHE$module | sed 's/\.$//g')" + bar="$bar$module_out" fi done # Uncomment to remove last separator @@ -59,7 +59,7 @@ run_module() fi [[ ! "$out" = "" ]] && [[ ! "$module" = "NULL" ]] && out="$out$SEPARATOR." - echo $out > "$OUTPUT_CACHE$module" + echo "$out" > "$OUTPUT_CACHE$module" } run()