I need to create a script that will execute daily (cron job), calculate the uptime of the system, and if that number is greater than 72 hours, reboot the system.
I am getting lost in converting the value of hours to something I can compare to 72. It returns me 6499.04: command not found
#!/bin/bash if $(awk '{print $1}' /proc/uptime) / 3600 > 72 ; then echo "yes" fi Thank you in advance for any help!