Created
July 21, 2018 13:09
-
-
Save harding/5598a1978a3b997c7360cdb234cb6838 to your computer and use it in GitHub Desktop.
Quick script to count nodes in Luke's seeder data
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 -eu | |
DATA=node-count.data | |
while git checkout HEAD~30 | |
do | |
date=$( git log -1 --date=unix | grep ^Date | awk '{ print $2 }' ) | |
echo -n "$date " >> $DATA | |
## $8 is the 30d uptime; 5..100 shows nodes with uptime >= 5% | |
awk '{print $8}' seeds.txt | numgrep 5..100 | wc -l >> $DATA | |
## Show progress | |
git log -1 | grep ^Date | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment