-m
Suppress replacement on match V8.1 and later
Ordinarily, a successful lookup in a database map
causes the key to be replaced by its value. When the
intention is to merely verify that the key exists
(not to replace it) the -m
switch can be used to suppress
replacement.
For example, the values that are returned from the
hosts.byname NIS database map
are not generally useful (they contain multiple
hostnames). In looking up a key in this database map
(with $(
and
$)
; see Use $( and $) in Rules
on page 892), the -m
switch prevents those multiple names
from wrongly replacing the single hostname in the
key. Note that the -a
switch (-a on
page 887) can still be used to append a suffix to a
successful lookup. Also, the $:
default
(Specify a Default with $: on
page 893) is still used if the lookup fails.
Get sendmail, 4th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.