#!/bin/sh # # FILESTATS: Make a File Stats Page that tells you all the goodies # about textfiles.com and lets you see how big the thing is. I="/textfiles/inbox.html" echo "T E X T F I L E S" >$I echo "" >>$I echo "
" >>$I echo "

TEXTFILES.COM Inbox Statistics

" >>$I echo "This Document Was Last Updated at `date`" >>$I echo "

" >>$I echo "" >>$I echo "
 Directory" >>$I echo " # of Files" >>$I echo " Size of Directory" >>$I cd /textfiles/holdbin for directory in * do if [ ! "$directory" = "OUTBOX" ] then if [ -d $directory ] then nfiles="`find /textfiles/holdbin/$directory -type f -print | grep -v .html | wc -l`" bytes="`du -sb /textfiles/holdbin/$directory | cut -f1`" let tfiles="$tfiles + $nfiles" let tbyte="$tbyte + $bytes" # echo "
 $directory" >>$I echo "
 $directory" >>$I echo "  `/textfiles/magic/comma $nfiles`" >>$I echo "  `/textfiles/magic/comma $bytes`" >>$I fi fi done echo "
 Totals" >>$I echo " `/textfiles/magic/comma $tfiles` files" >>$I echo " `/textfiles/magic/comma $tbyte` bytes" >>$I echo "

" >>$I echo "" >>$I