#!/bin/bash
scp -P 19192 qminer@megacarrot.frylabs.net:/home/qminer/mrfrys-node-server/stats/idstats "./idstats.new"
scp -P 19192 qminer@megacarrot.frylabs.net:/home/qminer/old.nodeServ/stats/idstats "./idstats.old"

cat idstats.new | jq 'keys' > idstats.new.keys
cat idstats.old | jq 'keys' > idstats.old.keys

cat idstats.new.keys idstats.old.keys | sort | uniq > keys.tmp

cat keys.tmp | grep -Eo '[0-9]{13}' > ids

rm idstats.new
rm idstats.new.keys
rm idstats.old
rm idstats.old.keys
rm keys.tmp
