That looks like a complicated script for this. Here's my script for uptime.
Code:echo "UP: \c" uptime | cut -d ' ' -f 4-8 | sed -e s'/,//g;s/ / /g' | cut -d ' ' -f 1-3 | sed s'/,[ ]+users//'
I didn't write it, but it's a cool script in that it senses one day, hour, or minute and displays the singular form of the time, then if it's more than one day, hour, or minute, it adds an "s" to the word.
Looks great all except sensing one "day"....one minute or one hour display properly.