Merge branch 'master' of github.com:dylanaraps/fetch
This commit is contained in:
commit
b0cee7c7d7
1 changed files with 3 additions and 0 deletions
3
fetch
3
fetch
|
@ -527,6 +527,7 @@ getuptime () {
|
||||||
|
|
||||||
*)
|
*)
|
||||||
uptime="$(uptime -p)"
|
uptime="$(uptime -p)"
|
||||||
|
[ "$uptime" == "up " ] && uptime="up $(awk -F'.' '{print $1}' /proc/uptime) seconds"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
@ -582,6 +583,7 @@ getuptime () {
|
||||||
uptime=${uptime/up}
|
uptime=${uptime/up}
|
||||||
uptime=${uptime/minutes/mins}
|
uptime=${uptime/minutes/mins}
|
||||||
uptime=${uptime/minute/min}
|
uptime=${uptime/minute/min}
|
||||||
|
uptime=${uptime/seconds/secs}
|
||||||
uptime=${uptime# }
|
uptime=${uptime# }
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
@ -593,6 +595,7 @@ getuptime () {
|
||||||
uptime=${uptime/ hour/h}
|
uptime=${uptime/ hour/h}
|
||||||
uptime=${uptime/ minutes/m}
|
uptime=${uptime/ minutes/m}
|
||||||
uptime=${uptime/ minute/m}
|
uptime=${uptime/ minute/m}
|
||||||
|
uptime=${uptime/ seconds/s}
|
||||||
uptime=${uptime/,}
|
uptime=${uptime/,}
|
||||||
uptime=${uptime# }
|
uptime=${uptime# }
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in a new issue