From 43cfab598c2f1f8568794373a708bec2bba0fa1a Mon Sep 17 00:00:00 2001 From: Dylan Date: Tue, 2 Feb 2016 14:13:09 +1100 Subject: [PATCH] Quote array in for loop to avoid splitting --- fetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fetch b/fetch index d15fcd78..3fbc6fbd 100755 --- a/fetch +++ b/fetch @@ -1229,7 +1229,7 @@ getbattery () { fi # Print each battery on a seperate line. - for bat in ${batteries[@]}; do + for bat in "${batteries[@]}"; do prin "${title}${index}: ${bat}%" index=$((index + 1)) done