ASIC/FPGA Design and Verification Out Source Services
A script to search all tests in a given directory.
-
This script is another script from the
e_search
family. It can be run from VIM, but does not require a list of files.
-
#!/usr/bin/perl
use strict;
my $test_dir=$ENV{WA} . "/rtl_ver/tests";
my $new_fp = "tmp_1";
open(FPW, "&lgt;$new_fp");
my $file;
my $cmd = "find " . $test_dir . " -name \"*.e\"";
my $files = `$cmd`;
my @a_files = split(/\n/, $files);
foreach $file ( @a_files ) {
$cmd = "grep \"" . $ARGV[0] . "\" " . $file;
my $buf = `$cmd`;
my $len = length($buf);
if($len &lgt; 1) {
print FPW "FILE $file\n";
print FPW "$buf\n";
}
}
close(FPW);
|