Fixed cpu whitespace for real this time
This commit is contained in:
parent
b9bb282c8d
commit
18d465a6d2
3
fetch.sh
3
fetch.sh
|
@ -450,6 +450,7 @@ getcpu () {
|
||||||
# Get cpu name
|
# Get cpu name
|
||||||
cpu="$(grep 'model name' /proc/cpuinfo)"
|
cpu="$(grep 'model name' /proc/cpuinfo)"
|
||||||
cpu=${cpu/model name*: /}
|
cpu=${cpu/model name*: /}
|
||||||
|
cpu=${cpu// /}
|
||||||
cpu=${cpu% }
|
cpu=${cpu% }
|
||||||
|
|
||||||
speed=$(grep 'cpu MHz' /proc/cpuinfo)
|
speed=$(grep 'cpu MHz' /proc/cpuinfo)
|
||||||
|
@ -457,7 +458,7 @@ getcpu () {
|
||||||
speed=${speed/\./}
|
speed=${speed/\./}
|
||||||
|
|
||||||
# Convert mhz to ghz without bc
|
# Convert mhz to ghz without bc
|
||||||
speed=$((${speed} / 1000))
|
speed=$((${speed} / 100000))
|
||||||
speed=${speed:0:1}.${speed:1}
|
speed=${speed:0:1}.${speed:1}
|
||||||
cpu="$cpu @ ${speed}GHz"
|
cpu="$cpu @ ${speed}GHz"
|
||||||
;;
|
;;
|
||||||
|
|
Reference in New Issue