#!/usr/local/bin/perl -w
# filter files for engineered

@files=qw(`ls data/*.ent`);
open (OUTFILE, ">toremove.txt");

while (<@files>){
	$filename=$_;
	open (FILET, $filename);
	$bad=0;
	while (<FILET>){
		if (/ENGINEERED/){
			print $filename ."\n";
			$bad=1;
		}
	}
	close FILET;
	if ($bad==1){
		print OUTFILE $filename."\n";
		unlink($filename);
		$bad=0;
	}
}
close OUTFILE;
