use strict;
##########################################################################
# $Id: hosthash,v 1.1 2004/10/29 21:19:02 kirk Exp $
##########################################################################

# This feature concieved by mark@winksmith.com

my $hostname = $ENV{'LOGWATCH_ONLY_HOSTNAME'};

if (($ENV{'LOGWATCH_DEBUG'} > 5) and $hostname) {
   print STDERR "DEBUG: Inside OnlyHostname for $hostname\n";
}

my $line;
my %hosts;

while (defined($line = <STDIN>)) {
      $line =~ m/^... .. ..:..:.. ([\w\-\_]+)\b/io; 
	  $hosts{$1} = "1";
}

my @uniquehost = sort keys (%hosts);

for my $host (@uniquehost) { print "$host\n"; };
