Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- ###################
- # Avg temp of CPU
- # Autor : wytrzeszcz
- # Licence: do whatever you want but not cut autor name
- cpus=`lscpu -p |grep -v "#" |wc -l` #count cpus
- sensors |
- grep Core |
- sed 's/^[^+]*//g' |
- sed 's/([^(]*//g' |
- sed 's/[^0-9\.]//g' |
- awk ' { printf $0"+"}' |
- sed "s/+$/)\/$cpus.0/g"|
- sed 's/^/(/g' |
- sed 's/$/\n/' |
- bc |
- sed 's/$/`C/g' |
- sed 's/^/CPU temp: /g'
Advertisement
Add Comment
Please, Sign In to add comment