#! /bin/bash
# Last edited on 2014-06-27 20:54:51 by stolfilocal

# Check the cleanup status of the transaction logs copypasted from BitcoinWisdom.com
# Writes files ".cleans" ".raws-{apple,linux}" ".toclean-{apple,linux}" ".noraw" ".cleaned"

( cd clean && ls 2*.txt ) | sed -e 's:[.]txt$::g' | sort > .cleans
( cd raw/linux && ls 2*.txt ) | sed -e 's:-raw[.]txt$::g' | sort > .raws-linux
( cd raw/apple && ls 2*.txt ) | sed -e 's:-raw-apple[.]txt$::g' | sort > .raws-apple
cat .raws-linux .raws-apple | sort | uniq > .raws
bool 1-2 .raws-linux .cleans > .toclean-linux
bool 1-2 .raws-apple .cleans > .toclean-apple
bool 2-1 .raws .cleans > .noraw
bool 1.2 .raws .cleans > .cleaned
wc -l .cleans .raws-{apple,linux} .toclean-{apple,linux} .noraw .cleaned
