Fix shellcheck errors SC2086 89/5189/1
authorAnil Belur <abelur@linuxfoundation.org>
Tue, 13 Jun 2017 03:03:32 +0000 (13:03 +1000)
committerAnil Belur <abelur@linuxfoundation.org>
Tue, 13 Jun 2017 03:03:32 +0000 (13:03 +1000)
SC2086: Double quote to prevent globbing and word splitting.

Change-Id: Ib9fd89a72d3c3f4788f9b1c02a882ace0250bd09
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
shell/sysstat.sh

index 022374a..03cab6d 100644 (file)
@@ -27,11 +27,11 @@ esac
 
 SAR_DIR="$WORKSPACE/archives/sar-reports"
 mkdir -p "$SAR_DIR"
-cp "$SYSSTAT_PATH/"* $_
+cp "$SYSSTAT_PATH/"* "$_"
 # convert sar data to ascii format
 while IFS="" read -r s
 do
-    [ -f "$s" ] && LC_TIME=POSIX sar -A -f "$s" > "$SAR_DIR/"sar${s//[!0-9]/}
+    [ -f "$s" ] && LC_TIME=POSIX sar -A -f "$s" > "$SAR_DIR/sar${s//[!0-9]/}"
 done < <(find "$SYSSTAT_PATH" -name "sa[0-9]*" || true)
 
 # DON'T fail build if script fails.