Solution in Bash and some general commands.
#!/bin/bash solve () { seq $1 $2 | sed -n -e'h;s/$/'{01,03,05,07,08,10,12}'01/;p;x' | LANG=C date -f- +'%b %a' | grep Fri | awk 'NR==1{printf $1}END{print " "$1" "NR}' } solve 2016 2020 # => Jan May 5 solve 1900 1950 # => Mar Dec 51 solve 1800 2500 # => Aug Oct 702 solve 1000 275760 # => Aug Aug 274761 solve 1973 1973 #=> [empty] [empty] 0
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Solution in Bash and some general commands.