Careful. uptime's output is dependent on how much time has passed. The .+? days bit may not always be there for example. That's why I, in general, would agree with rob_au on getting the information from a more friendly interface - of course, the caveats sauoq mentioned apply here. Choose your poison.