Prev | Current Page 1181 | Next

Bryan Costales, Claus Assmann, George Jansen, Gregory Shapiro

"sendmail, 4th Edition"

These $[ $] operators can be used only on the RHS, and are fully described in
?§23.4.3 on page 895.
18.9.15 $( $)
Perform a database-map lookup/action RHS operators
The $( and $) operators perform a wide range of actions. They can be used to look up
information in databases, files, or network services, or to perform transformation (suchas
dequoting), or to store values in macros. These operators make many customizations
possible. Their simplest use might look like this:
R $- $: $( faxusers $1 $) ?†? look up in a database
R $- $: $( dequote $1 $) ?†? perform a transformation
In the first line, the intention is for users listed in the faxusers database to have their mail
delivered by fax instead of by email. Any lone username in the workspace (matched by the
$-) is looked up (the $1 inside the $( and $) operators) in the faxusers database. If that
username is found it that database, the workspace is replaced by the value for that name
(perhaps something such as user@faxhost). If the user is not found in the database, the
workspace is unchanged.
The second line looks for any lone username in the workspace, and dequotes (removes
quotation marks from) that name using the built-in dequote type (?§23.7.5 on page 904).
Note that the $( and $) operators can be used only on the RHS of rules. They are fully
explained in ?§23.4 on page 892.


Pages:
1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193
wyciągarki wróżby miłosne cukiernia-stykowscy.pl salon kosmetyczny kraków pompy ciepła