mirror of
https://github.com/Horhik/dotfiles.git
synced 2024-11-08 18:03:13 +00:00
11 lines
194 B
Bash
11 lines
194 B
Bash
#!/bin/sh
|
|
|
|
c=0;t=0
|
|
|
|
awk '/MHz/ {print $4}' < /proc/cpuinfo | (while read -r i
|
|
do
|
|
t=$( echo "$t + $i" | bc )
|
|
c=$((c+1))
|
|
done
|
|
echo "scale=2; $t / $c / 1000" | bc | awk '{print $1" GHz"}')
|