1
0
mirror of https://github.com/MariaDB/server.git synced 2025-05-07 04:01:59 +03:00

17 lines
245 B
PHP

perl;
$file = $ENV{'grep_file'};
$pattern = $ENV{'grep_pattern'};
open(FILE, "$file")
or die("Cannot open file $file: $!\n");
$lines = 0;
while(<FILE>) {
$lines++ if (/$pattern/);
}
print "$lines\n";
close(FILE);
EOF