Hacker News new | ask | show | jobs
by helsinki 1680 days ago
cal -y | sed -E '1,2d;s/(.{20}) /\1\n/g;' | python3 -c “import sys, calendar;[print(ln.strip()) for ln in sys.stdin.readlines() if ln.strip() in calendar.month_name]”

easier to do:

python3 -c “import calendar;[print(m) for m in calendar.month_name]”

1 comments

I think you've only read the title? :-) The article is about a script that prints the full calendar format, with all the days/dates in between to be able to count some weeks. Not just a list of month names.