Better uptime command that will work accross uptime versions
This commit is contained in:
parent
bd7ebdfe4b
commit
0a2fa2b558
1 changed files with 4 additions and 1 deletions
5
neofetch
5
neofetch
|
@ -238,7 +238,10 @@ getuptime() {
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"Android"*)
|
"Android"*)
|
||||||
uptime=$(uptime | awk -F ': |, ' '{printf $2}')
|
uptime=$(uptime | awk -F ' up' '{print $2}')
|
||||||
|
time="${time//[0-9] user*}"
|
||||||
|
time="${time//load average:*}"
|
||||||
|
time="${time%,*} ${time##*,}"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
|
|
Loading…
Reference in a new issue