Skip to content

Instantly share code, notes, and snippets.

@vinniefalco
Created August 6, 2024 14:37
Show Gist options
  • Select an option

  • Save vinniefalco/81a31b26b8bc9aa371ace8d065eec852 to your computer and use it in GitHub Desktop.

Select an option

Save vinniefalco/81a31b26b8bc9aa371ace8d065eec852 to your computer and use it in GitHub Desktop.
Bash script for counting unique Boost authors by year from commits in a local superproject
#!bash
for year in $(seq 1999 2024); do
cd boost/libs
rm -rf ../../../$year.temp.txt
for dir in */; do
cd $dir
git --no-pager log \
--pretty=format:"%an" \
--after="$year-01-01" \
--until="$year-12-31" \
| sort \
| uniq \
>> ../../../$year.temp.txt
cd ..
done
cd ../..
cat $year.temp.txt \
| sort \
| sed 's/ .*//' \
| uniq \
> $year.txt
rm -rf $year.temp.txt
echo $year","`wc -l < $year.txt`
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment