1#!/usr/bin/perl 2 3# Get all the postconf parameter names from the postconf.proto file. 4 5die "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 10open(POSTCONF, $protofile) || die " cannot open $protofile: $!\n"; 11 12while(<POSTCONF>) { 13 if (/^%(PARAM)\s+(\S+)/) { 14 $found{$2} = 1; 15 } 16} 17 18while (<>) { 19 if (/^%(PARAM)\s+(\S+)/) { 20 delete $found{$2}; 21 } 22} 23 24for $name (sort keys %found) { 25 print $name,"\n"; 26} 27 28