1 2 3 4 5 6 7 8 9
#!/bin/bash extract-cids > to_stats sum=0 ; while IFS="" read -r p || [ -n "$p" ] do num=$(ak-ipfs-block-stat $p | grep Size | sed -e 's/Size: //g') sum=$(expr $sum + $num ) done < to_stats echo "Chain is : $sum bytes" rm to_stats