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