Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # 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"}}
Advertisement
Add Comment
Please, Sign In to add comment