mirror of
				https://github.com/MariaDB/server.git
				synced 2025-11-02 02:53:04 +03:00 
			
		
		
		
	
		
			
				
	
	
		
			17 lines
		
	
	
		
			245 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			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
 |