Implement weekday vizualizer script
authorSiraaj Khandkar <siraaj@khandkar.net>
Wed, 21 Apr 2021 12:41:01 +0000 (08:41 -0400)
committerSiraaj Khandkar <siraaj@khandkar.net>
Wed, 21 Apr 2021 12:41:01 +0000 (08:41 -0400)
home/bin/weekday-viz [new file with mode: 0755]

diff --git a/home/bin/weekday-viz b/home/bin/weekday-viz
new file mode 100755 (executable)
index 0000000..d5202ab
--- /dev/null
@@ -0,0 +1,15 @@
+#! /bin/sh
+
+awk -v dow="$(date '+%u')" '
+    BEGIN {
+        viz[1] = "M---- --"
+        viz[2] = "-T--- --"
+        viz[3] = "--W-- --"
+        viz[4] = "---T- --"
+        viz[5] = "----F --"
+        viz[6] = "----- S-"
+        viz[7] = "----- -S"
+
+       print viz[dow]
+    }
+'
This page took 0.018875 seconds and 4 git commands to generate.