Created
April 9, 2020 21:39
-
-
Save apathor/49bb1ce1e864a858ca52b2c6dd2ff9be to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unimoon is a function | |
unimoon () | |
{ | |
local pha=(π π π π π π π π); | |
local cyc=2551392 adj=-604800; | |
local now pos num; | |
now="${1:-$(printf "%(%s)T\n" "-1")}"; | |
pos=$(( (now + adj) % cyc )); | |
num=$(( pos / ( cyc / ${#pha[@]} ) )); | |
printf "%s\n" "${pha[$num]}" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment