#!/bin/bash while true; do tmp="`aticonfig --adapter=0 --od-gettemperature | grep Temperature | awk '{print $5}'`" temp=$( printf "%0.f\n" $tmp ) if [ $temp -lt 45 ]; then echo "temp=$temp fanspeed=0" aticonfig --pplib-cmd "set fanspeed 0 0" elif [ $temp -lt 55 ]; then echo "temp=$temp fanspeed=40" aticonfig --pplib-cmd "set fanspeed 0 40" else echo "temp=$temp fanspeed=100" aticonfig --pplib-cmd "set fanspeed 0 100" fi sleep 5 done