# Get the uptime in a readable format # Source https://www.mariusv.com/grep-sed-and-awk uptime | awk 'BEGIN {FS=" "} { gsub(",",""); if (index($0,"day")) {gsub(":"," hours, ",$5);print $3" "$4", "$5" minutes"} else {gsub(":"," hours, ",$3); print $3" minutes"}}