This unquated regex could be splitted into two arguments and sed will
not work. I've see giving error of wrong arguments being used on my
desktop.
Signed-off-by: Kairui Song <kasong@redhat.com>
local family
local model
local stepping
- family=$(grep -E "cpu family" /proc/cpuinfo | head -1 | sed s/.*:\ //)
- model=$(grep -E "model" /proc/cpuinfo | grep -v name | head -1 | sed s/.*:\ //)
- stepping=$(grep -E "stepping" /proc/cpuinfo | head -1 | sed s/.*:\ //)
+ family=$(grep -E "cpu family" /proc/cpuinfo | head -1 | sed "s/.*:\ //")
+ model=$(grep -E "model" /proc/cpuinfo | grep -v name | head -1 | sed "s/.*:\ //")
+ stepping=$(grep -E "stepping" /proc/cpuinfo | head -1 | sed "s/.*:\ //")
if [[ "$(get_cpu_vendor)" == "AMD" ]]; then
if [[ $family -ge 21 ]]; then