aboutsummaryrefslogtreecommitdiff
path: root/bin/ak-calculate-size
blob: 640d841be633e5f740722e249dcc8765a0c15168 (plain)
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=$(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