From 0b8587cc24beb006b8c03abb6d619d9b94b5b250 Mon Sep 17 00:00:00 2001 From: Dylan Date: Tue, 19 Jan 2016 11:12:38 +1100 Subject: [PATCH] NetBSD: cpu speed --- fetch | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/fetch b/fetch index 0248ded8..654425e9 100755 --- a/fetch +++ b/fetch @@ -577,6 +577,15 @@ getcpu () { cpu="$(grep -F 'model name' /proc/cpuinfo)" cpu=${cpu/model name*: /} cpu=${cpu/ @*/} + + # Get cpu speed + speed="$(grep -F 'cpu MHz' /proc/cpuinfo)" + speed=${speed/cpu MHz*: /} + speed=${speed/'.'/} + speed=$((speed / 100)) + speed=${speed:0:1}.${speed:1} + + cpu="$cpu @ ${speed}GHz" ;; *)