$ for year in {2002..2008}; do \
  count=$( git log | grep ^Date: | grep $year | wc -l ); \
  echo "Number of commits in $year: $count"; \
  done
Number of commits in 2002: 3094
Number of commits in 2003: 3283
Number of commits in 2004: 3851
Number of commits in 2005: 6006
Number of commits in 2006: 8431
Number of commits in 2007: 9532
Number of commits in 2008: 11292

 -Hans


Reply via email to