hmmm ... I would suggest the awk is possibly missing something, like a change of delimiter
As for the command line, no need to over-think it:
Code:
$ IFS="," read d t _ <<<"$(uptime)"
$ echo $d $t
23:58:05 up 9 days 23:06
This is correct output as my uptime format is:
Code:
00:00:39 up 9 days, 23:09, 0 users, load average: 0.00, 0.06, 0.52
So commas are not really helpful in mine, so hopefully will get better output with yours