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

5 lines
145 B
Bash

#!/usr/bin/env bash
uptime=$(cat /proc/uptime | awk '{print $1 / 60; print $1 % 60}' | xargs printf '%d min %d sec' 2>/dev/null)
echo "$uptime"