Description is a HFPM module that instantiates (fills in) a file with field values and environmental variable values and appends the result to some given files.

Usage formatfile {destination_files} in the pipeline.

Usage Explanation

This module appends a formatted message to a number of files specified on the pipeline as arguments. If no destination files are given as arguments, then the field "_appendfile" is interpreted as a whitespace-separated list of files to append to.

The template file indicated as the first argument on the pipeline is instantiated with field values and environmental variable values as in variable encoded format. The result is then appended to the files.

If any of the files can't be found, the value of field "_comment_dir" is used as the base directory for the formatfile provided that field is defined.


" /usr/www/comments/appendformat /usr/www/comments/log.html" on the pipeline
Instantiates "/usr/www/comments/appendformat" and appends it to "/usr/www/comments/log.html".
" appendformat" on the pipeline, "log.txt log2.txt" in the field "_appendfile" and "/usr/web/comments" in the field "_comment_dir"
Instantiates "/usr/web/comments/appendformat" and append it to the files "/usr/web/comments/log.txt" and "/usr/web/comments/log2.txt" (unless the files are found in the current directory).

Other Notes

The current version number is 1.0.

This module is not 8-bit character clean; character 255 may be clobbered.

The is module should work on any Unix machine.

This module can be used more than once in the pipeline.

See Also

The variable encoded format used to encode the fields and environmental variables.
[HFPM Home] [Please comment]
Copyright © by James Hoagland |
30 January 1996