Summary
A sed command which parses the output of uptime.
Assumptions
- A sed with support for extended regular expressions.
Purpose
- I want to use the uptime command (just the amount of time awake) in a geeklet for GeekTool, and thought the awk based version a bit awkward.
Script
I've included a shell script and some sample uptime output in a git repository.
Most of the ideas for this were taken from uptime's source code and a forum post.