summaryrefslogtreecommitdiff
path: root/tempmon.sh
blob: 7fe99d9040bfedd7805491dafe37aa9ff2b5dc3c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/bash

thresh=$1
shift

while true; do
    num=`acpi -t|sed -nr 's/.*, ([0-9.]*) .*/\1/p`
    num=${num:-0}
    if (( "$num" > "$thresh" )); then
	eval "$*"
    else
	sleep 1
    fi
done