Last active
October 9, 2020 21:50
-
-
Save zabetak/413cf1538ca9b026622e62596e094f6e to your computer and use it in GitHub Desktop.
Count the number of commits per quarter having a message that ends up with parentheses and certain specific characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
for (( year=$1; year<=$2; year++ )) | |
do | |
echo -n "Q1 $year:" | |
git log --oneline --after="$year-01-01" --until="$year-04-01" | grep "([[:alnum:] ,\.]\+)$" | wc -l | |
echo -n "Q2 $year:" | |
git log --oneline --after="$year-04-01" --until="$year-07-01" | grep "([[:alnum:] ,\.]\+)$" | wc -l | |
echo -n "Q3 $year:" | |
git log --oneline --after="$year-07-01" --until="$year-10-01" | grep "([[:alnum:] ,\.]\+)$" | wc -l | |
echo -n "Q4 $year:" | |
git log --oneline --after="$year-10-01" --until="$((year+1))-01-01" | grep "([[:alnum:] ,\.]\+)$" | wc -l | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment