How to determine uptime in a SunOS UNIX unit in seconds?
On Linux, I could just cat / proc / uptime and accept the first argument:
cat /proc/uptime | awk '{print $1}'
I am trying to do the same in a SunOS UNIX window, but not / proc / uptime. There is an uptime command that presents the following output:
$ uptime 12:13pm up 227 day(s), 15:14, 1 user, load average: 0.05, 0.05, 0.05
I really don't want to write code to convert the date to seconds only, and I'm sure someone should have had this requirement before, but I could not find anything on the Internet.
Can someone tell me how to get uptime in just a few seconds?
TIA
unix shell sunos uptime
Jf.
source share