Skip to content

Instantly share code, notes, and snippets.

@reinvented
Last active June 23, 2018 19:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save reinvented/23af9f7503d293a79f078f61da8d914e to your computer and use it in GitHub Desktop.
Save reinvented/23af9f7503d293a79f078f61da8d914e to your computer and use it in GitHub Desktop.
Count the number of blog posts per week in Ton's blog
export LC_ALL=C
curl -s https://www.zylstra.org/blog/feed/ | \
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"
@reinvented
Copy link
Author

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