#!/usr/athena/bin/perl

while($ARGV[0] =~ /=/){
	push(@conds, shift(@ARGV));
}

while(<>){
	$line = $_;
	($host, $x, $x, $date, $zone, $meth, $uri, $prot, $status, $size,
	 $ref, $cookie, $browser) = split;

	$true=0;
	foreach $arg (@conds){
		$ct++;
		($condition, $value) = split("=", $arg);
		if($condition eq "h"){
			if($host eq $value){
				$true++;
			}	
		}
		elsif($condition eq "H"){
			if($host ne $value){
				$true++;
			}	
		}
	}
	print $line if $true > 0;

}