Skip to content

Instantly share code, notes, and snippets.

@sgsfak
Last active August 29, 2015 13:56
Show Gist options
  • Save sgsfak/0caa86375b18c75752b8 to your computer and use it in GitHub Desktop.
Save sgsfak/0caa86375b18c75752b8 to your computer and use it in GitHub Desktop.
Find Years with August with 5 Fridays, Saturdays , and Sundays
for j in `seq 2014 2050`; do
i=8
ncal $i $j | tail -3 | (echo -n "$j," ; awk 'BEGIN{ORS=","} {print NF-1}';echo)
done | egrep "5,5,5,$" |cut -f1 -d,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment