#!/bin/sh
temp1=70
temp2=85
temp=$(nvidia-smi | grep 'Default' | awk '{print $3}' | sed 's/C//')
temp=${temp%???}
if [ "$temp" -ge "$temp2" ] ; then
echo "Gpu: $temp°C"
elif [ "$temp" -ge "$temp1" ] ; then
echo "Gpu: $temp°C"
else
echo "Gpu: $temp°C"
fi