Name
-a
Synopsis
When a
key is looked up in a database (from inside the $(
and $) operators of the RHS of rules), a
successfully found key is replaced by its data. If the
-a switch is given, the text following that
switch, up to the first delimiting whitespace character, is appended
to the replacement data. For example:
-a appends nothing -a. appends . -a,MAGICTOKENappends ,MAGICTOKEN
The text to be appended is taken literally. Quotation marks and
backslashed characters are included without interpretation, so
whitespace cannot be included in that text. Because the rewritten RHS
is normalized as an address, special address expressions (such as
parentheses) should be avoided. The use of appended text is one of
two methods used for recognizing a successful lookup in rules.
We’ll discuss the other, $:, in
Section 23.4.1.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access