mirror of
https://github.com/smxi/inxi.git
synced 2025-01-19 08:57:57 +00:00
tweaked uptime output, added dash, removed space
This commit is contained in:
parent
e8cceeb024
commit
b6eb285cf9
3
inxi
3
inxi
|
@ -1188,7 +1188,8 @@ get_networking_data()
|
||||||
## return uptime string
|
## return uptime string
|
||||||
get_uptime()
|
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"
|
echo "$up_time"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue