homeserver/roles/mgrote.install_packages/templates/systemtemps.sh

3 lines
270 B
Bash
Raw Normal View History

2020-08-18 11:57:53 +02:00
#!/bin/bash
sudo ipmitool sensor | cut --delimiter '|' -f 1-3 | grep -i "degrees" | sort -k2 -r | tr --delete "|" | tr --squeeze-repeats " " | sed -r 's/(degrees C)/°C/g;s/([[:alnum:]]+[[:space:]][[:alpha:]]+ )([[:digit:]]+\.[[:digit:]]+ )(°C)/\2\3\t\1/g;s/(.000)//g'