-v
Specify the value’s column V8.7 and later
The manner in which the key and its value are visually
displayed in flat, sequential text files and certain
network services, might not be directly suitable for
use with database maps. A text
-type file—for example,
/etc/hosts—might display the
key on the right and the value on the left:
123.45.67.89 here.our.domain
For such circumstances, the -v
switch can be used with the K
command to specify the
column or item that will be returned as the value
when a key is matched. For example:
Kaddr text -k1 -v0 /etc/hosts
For nisplus
,
netinfo
,
user
, and other
such database maps, the -v
switch specifies the name (text) of
the value’s column.
This -v
switch
specifies which column is the value to return. If it
is omitted, it defaults to 0 for the text
type (which is
indexed beginning with 0) to the last named column
for the nisplus
type, and to the string "members
" for the netinfo
type. Note that
the -v
switch has
a different meaning for the ph
database-map type. See also -k
(-k
on page 888) for the value’s column and -z
(-z on page 891) for the column
delimiter.
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.