I need to create a script that will execute daily (
cron job), calculate the uptime of the system (days only), and if that number is greater than a defined value (e.g. 30), email the system's information (
uname -a) and the number of days to some address (e.g.
I am getting lost in converting the value of days to something I can perform a calculation on and take action. Started by using the
uptime | grep -o "up.*day"
command but then got stuck. Using CentOS 7.8.
Thank you in advance for any help!