mirror of
https://github.com/MariaDB/server.git
synced 2025-01-27 17:33:44 +01:00
16 lines
245 B
PHP
16 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
|