# Script to compare directories and remove duplicate files from one
#Use: thin_dirs [reference directory][directory to be thinned]

thinning_dir=`echo $2`;
ref_dir=`echo $1`;

for i in $( ls $ref_dir );
do
	for e in $( ls $thinning_dir );
	do
		if 
			[[$ref_dir/$i==$thinning_dir/$e]];
		then
			rm -f $thinning_dir/$e;
		fi
	done
done