j  <� ht://Dig: Configuration file format -- Variable Expansion � 0  

2 Configuration file format -- Variable Expansion



W ht://Dig Copyright © 1995-2002 The ht://Dig Group
8 Please see the file COPYING for license information.




 Attribute values can contain@ references to other attributes. This is done similarly to howA Perl, Bourne shell, and Makefiles use variables. The variablesB that are referenced will be expanded when the variable is used,@ not when it is defined. This means that attributes don't have2 to be defined in the order that they are used. 



5 Example attribute reference in an attribute value:

' database_base: ${database_dir}/htdig


 or 

% database_base: $database_dir/htdig


? Many default values use the attribute expansion mechanism to. make configuration easier and more generic.



< In addition to variable expansion, it is also possible to? include the contents of a file as the value of an attribute.: This is done by putting the filename in backquotes (`).? Within the backquotes, variable expansion will still work so9 that files can be specified relative to some path. The? backquotes and the filename will be replaced by the contents: of the file if it exists. All whitespace (spaces, tabs,? newlines, etc) in the file are condensed to one space before@ the substitution takes place. The following are some examples( of the use of the backquoting scheme:

  
2 start_url: `${common_dir}/starting_points`
- limit_urls_to: `${common_dir}/limit_list`


+Last modified: $Date: 2002/01/27 05:33:20 $ ÿÿ