#!/bin/sh # prints out logs that are in dir1 and in dir2 if [ $# != 2 ]; then echo "usage: $0 dir1 dir2" exit 1 fi here=$(pwd) dir1=$1 dir2=$2 fdir1=$here/$dir1 fdir2=$here/$dir2 of=$here/$dir1+$dir2.html echo "Logs that are in both $dir1 and $dir2" >$of echo "

Logs that are in both $dir1 and $dir2

" >>$of echo "" >>$of cd $fdir1 set *.log if [ $# = 1 -a "x$1" = "x*.log" ]; then echo "No errors" >>$of else num=0 echo "" >>$of echo "" >>$of while [ $# -gt 0 ]; do if [ -f ${fdir2}/$1 ]; then echo -n "" >>$of num=$(($num + 1)) fi shift done echo "
Log
" >>$of echo -n "" >>$of echo -n $(basename $1 .log) >>$of echo -n "" >>$of echo "

" >> $of echo "$num errors
" >> $of fi echo "
" >> $of echo "back to top" >> $of echo "" >>$of