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