You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
232 B

#!/bin/bash
#
# Author: Raphael P. Ribeiro <raphaelpr01@gmail.com>
uptime=$(</proc/uptime)
uptime=${uptime%%.*}
s=$(( uptime%60 ))
m=$(( uptime/60%60 ))
h=$(( uptime/60/60%24 ))
d=$(( uptime/60/60/24 ))
echo $d"d "$h"h "$m"min"