Files
client-tools-1.2/tools/configFileBuilder.pl
2015-08-04 12:05:18 -05:00

19 lines
318 B
Perl

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";
}