mirror of
https://bitbucket.org/seefoe/dockerized-swg.git
synced 2026-01-16 23:04:17 -05:00
19 lines
318 B
Perl
Executable File
19 lines
318 B
Perl
Executable File
while (<>)
|
|
{
|
|
next if (s/^cfg: // == 0);
|
|
chomp;
|
|
($section, $value) = /\[(.*)\] (.*)/;
|
|
$key{$section . "." . $value} = 1;
|
|
}
|
|
|
|
foreach (sort keys %key)
|
|
{
|
|
($section, $value) = split(/\./, $_, 2);
|
|
if ($section ne $oldSection)
|
|
{
|
|
$oldSection = $section;
|
|
print "[", $section, "]\n";
|
|
}
|
|
print "\t", $value, "\n";
|
|
}
|