#!/bin/sh # # AllIndex # V1.2 pl 01 - 8 Feb 1997 # # Collect 00Index files from this and all subdirectories. # Paste them into a collection file 00Index.all. # #BACKUPHOME=/usr/local/adm/jon ##cp 00index.all $BACKUPHOME/backup/00index.all /usr/5bin/echo ".............................................................\r\c" # This info has to be in 00index.txt file cat 00index.txt > 00index.tmp for a in `ls -F1 | grep "/" | grep -v incoming` do echo "" >>00index.tmp echo "## Directory " $a >>00index.tmp if cat -s $a/00index.txt >>00index.tmp; then /usr/ucb/echo -n "o" else /usr/ucb/echo -n "-" fi done echo " done." chmod 664 00index.tmp mv 00index.tmp 00index.all # copy monthly indexes to safe, now that you lost one.. ##cp *txt $BACKUPHOME/backup ##rm *txt~ ##cp *new $BACKUPHOME/backup ##rm *new~