git_wc_history.sh 318 B

1234567891011121314151617
  1. #!/usr/bin/env zsh
  2. git checkout master
  3. while [ true ];
  4. do
  5. # Get the date
  6. git log | grep Date | head -n1
  7. # Get the total word count
  8. wc content/*.md -w | tail -n1 | sed -e 's/^[[:space:]]*//' | cut -d " " -f1
  9. git checkout 'HEAD^1' &> /dev/null
  10. if [ $? != 0 ]
  11. then
  12. break
  13. fi
  14. done