Skip to content

Instantly share code, notes, and snippets.

@alogic0

alogic0/full_moon.sh

Created Apr 28, 2019
Embed
What would you like to do?
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