We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 95e1179 commit 2dce9e9Copy full SHA for 2dce9e9
bash/clockhands.sh
@@ -0,0 +1,8 @@
1
+#!/usr/bin/env bash
2
+for i in {0..10}; do
3
+ t=$(( (43200 * i + 21600) / 11 ))
4
+ h=$((t / 3600))
5
+ m=$((t / 60 % 60))
6
+ s=$((t % 60))
7
+ printf "%02d:%02d:%02d\n" $((h == 0 ? 12 : h)) $((m)) $((s))
8
+done
zsh/clockhands.zsh
+#!/usr/bin/env zsh
+for i in $(seq 0 10); do
+ printf "%02d:%02d:%02d\n" $((h == 0 ? 12 : h)) $m $s
0 commit comments