For dbm files, the .pag and .dir
suffixes are added automatically. For db files, the .db suffix will be added automatically
if it is not already included in the name.
The makemap program reads from its standard input. That input is line-oriented and
contains the text from which the database files will be created. Lines that begin with
a # are interpreted as comments and ignored. Lines that contain no characters
(empty lines) are also ignored. Whitespace (spaces or tabs) separates the key on the
left from the data on the right. An example of such an input file is the following:
lady relaysite!lady
my.host relaysite!lady
bug bug.localuucp
The second line in this example shows that keys can be multitokened (my.host is
three tokens). In reading from existing files, some conversion might be required to
massage the input into a usable form. To make a database of the /etc/hosts file (for
converting hostnames into IP addresses), for example, a command line such as the
following might be required:*
% awk '/^[^#]/ {print $2, $1}' /etc/hosts | makemap ...
Here, awk(1) needs to eliminate comment lines (the /^[^#]/). Otherwise, it will
wrongly move them to the second column, where makemap will not recognize them
as comments.
* This simplified example won??™t work if the /etc/hosts file has multiple hostnames on the righthand side.
Pages:
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555