From b8c902e65f7e181693eeafac40c12aa89e246b92 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Wed, 5 Jul 2017 02:19:52 +0700 Subject: [PATCH] Uptime [HP-UX]: Remove leading zeroes Variables with a leading 0 are treated as base-8, so it halts HP-UX detection because of the error. --- neofetch | 1 + 1 file changed, 1 insertion(+) diff --git a/neofetch b/neofetch index 2c3a7ff0..5ccd8d32 100755 --- a/neofetch +++ b/neofetch @@ -403,6 +403,7 @@ get_uptime() { d="0" h="0" case "$t" in *"-"*) d="${t%%-*}"; t="${t#*-}";; esac case "$t" in *":"*":"*) h="${t%%:*}"; t="${t#*:}";; esac + h="${h#0}" t="${t#0}" seconds="$((d*86400 + h*3600 + ${t%%:*}*60 + ${t#*:}))" ;; esac