Created
May 2, 2017 14:09
-
-
Save mtholder/7a4161bdfdd82252beb922c77a119d9f to your computer and use it in GitHub Desktop.
get the unix timestamps (seconds since start of epoch) for every commit in phylesystem-1 that changes the # of studies
This file contains hidden or 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
| #!/bin/bash | |
| git rev-list HEAD > commits.txt | |
| prev_ns=0 | |
| for sha in $(cat commits.txt) | |
| do | |
| unix_time=$(git show -s --format=%at "${sha}") | |
| git checkout $sha || exit | |
| num_studies=$(find study -name "*.json" | wc -l) | |
| if test $num_studies -ne $prev_ns | |
| then | |
| echo $unix_time $num_studies | |
| fi | |
| prev_ns=$num_studies | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment