#!/bin/bash # need one parm for which directory to document. DOC_DIR=$1 # our temporary file will catch all the data we find. TMP_FILE=$TMP/doc_disc_$RANDOM.tmp echo >$TMP_FILE # only echo allowed to wipe it out. # write some headers. echo >>$TMP_FILE echo Directory Contents for $DOC_DIR >>$TMP_FILE echo >>$TMP_FILE # do a directory of the location. ls -R $DOC_DIR >>$TMP_FILE echo >>$TMP_FILE echo >>$TMP_FILE echo ============================================================================>>$TMP_FILE echo >>$TMP_FILE echo >>$TMP_FILE echo Dump of all text files in $DOC_DIR >>$TMP_FILE echo >>$TMP_FILE ###echo "what the heck is wrong\; here\'s file list:" >>$TMP_FILE ###find $DOC_DIR -type f -iname "*txt" >>$TMP_FILE # run the file dumper to get all those text files expanded. perl $SHELLDIR/dump.pl `find $DOC_DIR -type f -iname "*txt" ` >>$TMP_FILE # output our results. cat $TMP_FILE # clean up. rm $TMP_FILE