mirror of
https://github.com/Mastermindzh/dotfiles.git
synced 2024-11-25 00:03:06 +01:00
12 lines
309 B
Bash
12 lines
309 B
Bash
#!/bin/bash
|
|
|
|
temp=$(sensors | # execute sensors
|
|
grep -w "Core 0:" | # grep for the first core
|
|
sed 's/([^)]*)//g' | # filter
|
|
tr -s " " | # remove whitespace
|
|
sed -e 's/Core 0\(.*\):/\1/' | # get value between Core 0 and :
|
|
cut -c 3- | rev | cut -c 7- | rev #remove clutter
|
|
)
|
|
|
|
# echo out the result
|
|
echo $temp°C |