1
0
Fork 0
mirror of https://github.com/Horhik/dotfiles.git synced 2024-11-12 19:54:16 +00:00
Dotfiles/.config/polybar/polybar-scripts/system-cpu-frequency/system-cpu-frequency.sh

11 lines
194 B
Bash
Raw Normal View History

2020-07-27 04:59:00 +00:00
#!/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"}')