From ef1578283ccf488606988ef944036be64e558e7d Mon Sep 17 00:00:00 2001 From: Nicolas Sauzede Date: Wed, 19 Sep 2018 10:14:53 +0200 Subject: [PATCH] Double quote to prevent globbing and word splitting. --- spectre-meltdown-checker.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spectre-meltdown-checker.sh b/spectre-meltdown-checker.sh index 4578ab4..8cb91a3 100755 --- a/spectre-meltdown-checker.sh +++ b/spectre-meltdown-checker.sh @@ -1105,7 +1105,7 @@ parse_cpu_details() cpu_model=$( grep '^model' "$procfs/cpuinfo" | awk '{print $3}' | grep -E '^[0-9]+$' | head -1) cpu_stepping=$(grep '^stepping' "$procfs/cpuinfo" | awk '{print $3}' | grep -E '^[0-9]+$' | head -1) # read CPU ucode from $procfs/cpuinfo. fall-back to 0x0 if not found (eg: with a virtual machine) - cpu_ucode=$( raw_cpu_ucode=$(grep '^microcode' "$procfs/cpuinfo") && echo $raw_cpu_ucode | awk '{print $3}' | head -1 || echo "0x0") + cpu_ucode=$( raw_cpu_ucode=$(grep '^microcode' "$procfs/cpuinfo") && echo "$raw_cpu_ucode" | awk '{print $3}' | head -1 || echo "0x0") else cpu_friendly_name=$(sysctl -n hw.model) fi