Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Count the number of blog posts per week in Ton's blog
export LC_ALL=C
curl -s | \
grep pubDate | \
sed -e 's/<pubDate>//g' | \
sed -e 's/<\/pubDate>//g' | \
while read -r line ; do
date -j -f "%a, %d %b %Y %T %z" "$line" "+%V"
done | \
sort -n | \
uniq -c
export LC_ALL="nl_NL.UTF-8"
Copy link

Copy link

See some additional explanation, including a line-by-line breakdown of what this script does, here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment