Mac OS X: Added uptime (Needs to be tested)

This commit is contained in:
dylan araps 2016-01-04 15:04:25 +11:00
parent 4fc82847db
commit 596952e0a2

View file

@ -252,12 +252,13 @@ getuptime () {
;;
"Mac OS X")
# TODO: Fix uptime for OS X
uptime="Unknown"
uptime=$(uptime | awk -F',' '{print $1}')
uptime=${uptime# }
uptime=${uptime/??:?? /}
;;
"OpenBSD")
uptime=$(uptime | awk -F',' '{ print $1 }')
uptime=$(uptime | awk -F',' '{print $1}')
uptime=${uptime# }
;;