Skip to content

Instantly share code, notes, and snippets.

@alogic0
Created April 28, 2019 21:33
Show Gist options
  • Save alogic0/a40f9a385942b0addae8d5b9d8eb22dc to your computer and use it in GitHub Desktop.
Save alogic0/a40f9a385942b0addae8d5b9d8eb22dc to your computer and use it in GitHub Desktop.
Full moon dates
#!/bin/bash
moon_ar=(19 17 17 15 14 14 12 12);
c=0;
for i in {05..12};
do LC_TIME=ru_UA.UTF-8 date -d "2019-${i}-${moon_ar[$c]}" +'%B %d %a'; c=$(($c+1));
done \
| sed -E 's/(.+)/\L\1/; s/^(\w)/\U\1/; s/^(\w+)ая /\1ай /; s/^(\w+)я /\1ь /; s/^(\w+)а /\1 /'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment