#!/bin/sh

if test $# -ne 2
   then 
   echo "you must enter two directories name"
   exit 1
fi

if test -d $1
   then
   dir1=$1
   else
   echo "$1 is not a directory"
   exit 2
fi

if test -d $2
   then
   dir2=$2
   else
   echo "$2 is not a directory"
   exit 3
fi


ls -1  $dir1/*.out | sed s"%.*/%%" > toto1.tmp
sed -e "s%.*%echo ----------------------------------------- 
 ;echo & : 
 ; diff $dir1/& $dir2/&%" toto1.tmp > toto2.tmp
sh toto2.tmp
rm toto*.tmp
