10.5 The makemap Program | 373
db(3) library. Use of this switch with any other form of database will produce the following
error:
makemap: Type dbtype does not support -d (allow dups)
See the -r switch for a way to cause duplicates to replace originals.
10.5.1.4 -D
Define alternative to # as comment character makemap command-line switch
Normally, the makemap program ignores lines of input that begin with the # character, but
this can cause problems because some files use a different comment character. The dig(1)
program, for example, produces output that uses a semicolon as the comment character:
;; ANSWERS:
host.domain.com 1845 CNAME domain.com
To satisfy the need to build database-map files from such input, the -D command-line
switchwas added to the makemap program beginning withV8.13 sendmail. When you run
makemap withth e -D command-line switch, makemap will ignore lines of input that begin
with a semicolon:
% makemap -D\; file.db < file.txt
Note that, we prefix the semicolon with a backslash to insulate it from interpretation by
the shell.
10.5.1.5 -e
Allow empty data for keys makemap command-line switch
Normally, makemap refuses to allow keys without data. That is, the following infile:
bob Good User
ted
alice Gone User
would produce the following error when read by makemap:
makemap: hash: line 2: no RHS for LHS ted
But sometimes it is necessary to initialize or fill databases with new information when the
data is not known but where that lack of information is not harmful, or where the data is
not required.
Pages:
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674