#!/usr/bin/ksh GrepList=`sed '/^ *$/d;/^#/d' traplist.in 2>/dev/null` grep -ilF "$GrepList" out/do* 2>/dev/null | xargs -i mv {} ./capture 2>/dev/null #### #!/usr/bin/perl my @checklist; my @testfile; my $rulenames; open (FILE,"filename"); while () { next if ( $_ =~ /^ *$/ || $_ =~ /^#/ ); push @checklist , $_; } chomp @checklist; close (FILE); my $GrepList = join '|', map "($_)", @checklist; @ARGV = <*>; if (@ARGV) { undef $/; while (<>) { $_ =~ s/\n//; next unless ($_ =~ /$GrepList/i); print "$ARGV : $+\n"; } }