summaryrefslogtreecommitdiff
path: root/bin/bsdclock
blob: 0c805459ba033950a811cf217cac827fccc954f4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
#!/bin/sh
set -eu

tput civis
sleep=$(( 60 - $(date +'%S' | sed 's/^0//') ))
while :; do
	printf '%3s%% %s\r' "$(apm -l)" "$(date +'%a %H:%M')"
	sleep $sleep
	sleep=60
done