#!/bin/sh if ! gputemp=$(nvidia-smi --format=nounits,csv,noheader --query-gpu=fan.speed | xargs echo); then gputemp=0 fi echo "${gputemp}%"