tweaked uptime output, added dash, removed space

This commit is contained in:
inxi-svn 2008-10-31 01:34:51 +00:00
parent e8cceeb024
commit b6eb285cf9

3
inxi
View file

@ -1188,7 +1188,8 @@ get_networking_data()
## return uptime string
get_uptime()
{
local up_time=$( uptime | gawk '{ a = gensub(/^.*up *([^,]*).*$/,"\\1","g",$0); gsub(/ /,"",a); print a }' )
## note: removing gsub(/ /,"",a); to get get space back in there, goes right before print a
local up_time=$( uptime | gawk '{ a = gensub(/^.*up *([^,]*).*$/,"\\1","g",$0); gsub(/ /,"-",a); print a }' )
echo "$up_time"
}