in reply to Re: Process netgroup file with a regex
in thread Process netgroup file with a regex

Thanks for the pointers.

I know about the circular refs and the file format. etc, I am just trying to convert the data (triplets) into a CR delimited list. So

(host,,) (host-1,,) (host-1.domain,,) (host_234,,)
becomes
host host-1 host-1.domain host_234
I would ideally like to handle user entries (,user,) in the same code as I would already be pointing to a user file, we don't use domain entries and don't mix the data.

Replies are listed 'Best First'.
Re^3: Process netgroup file with a regex
by Velaki (Chaplain) on Aug 23, 2006 at 18:20 UTC

    I updated my code snippet, above. I think it's more in keeping with what you want. You'll still have to output the hashes, but that should be easy enough. Their keys are the alias names for the netgroup being scanned, and the values are refs to an array of names (host, user, or domain).

    Hope this helped
    -v.

    "Perl. There is no substitute."