Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pam = {
- debug = false
- ticket_lifetime = 36000
- renew_lifetime = 36000
- forwardable = true
- krb4_convert = false
- }
- [domain_realm]
- .example.com = EXAMPLE.COM
- example.com = EXAMPLE.COM
- [appdefaults]
- pam = {
- debug = false
- ticket_lifetime = 36000
- renew_lifetime = 36000
- forwardable = true
- krb4_convert = false
- }
- #!/usr/bin/perl -w
- use strict;
- my %conf;
- my $section;
- while (<>) {
- if (/^s*(S*)s*=s*{s*$/) {
- $section = $1;
- $conf{$section} = {};
- } elsif (/^s*(S*)s*=s*(S*)s*$/) {
- my $key = $1;
- my $value = $2;
- if ($section) {
- $conf{$section}{$key}=$value;
- }
- }
- }
- foreach (keys %conf) {
- $section = $_;
- foreach (keys %{$conf{$section}}) {
- print "$section:$_:$conf{$section}{$_}n";
- }
- }
Add Comment
Please, Sign In to add comment