1 #!/usr/bin/perl 2 3 # Get all the postconf parameter names from the postconf.proto file. 4 5 die "Usage: $0 protofile [filename...]\n" 6 unless $protofile = shift(@ARGV); 7 8 # Read the whole file even if we want to print only one parameter. 9 10 open(POSTCONF, $protofile) || die " cannot open $protofile: $!\n"; 11 12 while(<POSTCONF>) { 13 if (/^%(PARAM)\s+(\S+)/) { 14 $found{$2} = 1; 15 } 16 } 17 18 while (<>) { 19 if (/^%(PARAM)\s+(\S+)/) { 20 delete $found{$2}; 21 } 22 } 23 24 for $name (sort keys %found) { 25 print $name,"\n"; 26 } 27 28