MOON
Server: Apache/2.2.31 (Unix) mod_ssl/2.2.31 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4
System: Linux csr818.wilogic.com 2.6.18-419.el5xen #1 SMP Fri Feb 24 22:50:37 UTC 2017 x86_64
User: digitals (531)
PHP: 5.4.45
Disabled: NONE
Upload Files
File: //usr/share/logwatch/scripts/shared/hosthash
use strict;
##########################################################################
# $Id: hosthash,v 1.3 2005/02/24 17:08:05 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"; };
# vi: shiftwidth=3 syntax=perl tabstop=3 et