mmcarpi
docs & sizes: Compute number of documents and size in each taxonomy
0b63932
raw
history blame contribute delete
282 Bytes
#!/usr/bin/bash
for file in ./*; do
if [ -d $file ]; then
NCHARS=$(find $file -name '*.xml.gz' -exec bash -c 'gzip -d -c {} | wc -c' \; | awk 'BEGIN { a = 0 }; { a+=$1}; END { print a }')
printf '%-20s %s\n' $file $NCHARS | numfmt --to=iec --field=2
fi
done