#! /usr/bin/perl -w
# vim:syntax=perl

use strict;

my $address = shift or die "all all none $0 give address as arg\n";

while (<>){
    chomp;
    next if (/^#|^\s*$/);
    my @a = split;
    $a[0] eq $address and (shift @a, print "@a\n") and last;
}

__END__

=pod

=head1 NAME

lr_addresses2serviceflags - extract an addresses' service flags from address.cf

=head1 SYNOPSIS

B<lr_addresses2serviceflags> I<address>

=head1 DESCRIPTION

B<lr_addresses2serviceflags> parses a config file like 
/etc/lire/address.cf and print keys' values. Key - indicating an 
I<address> - should be given as argument.

=head1 SEE ALSO

lr_getaddresses(1)

=head1 VERSION

$Id: lr_addresses2serviceflags.in,v 1.6 2001/06/02 16:05:42 vanbaal Exp $

=head1 COPYRIGHT

Copyright (C) 2000-2001 Stichting LogReport Foundation LogReport@LogReport.org

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

=cut

