Cfpeek User Manual (split by section):   Section:   Chapter:FastBack: Formats   Up: Top   FastForward: Exit Codes   Contents: Table of ContentsIndex: Concept Index

5 Cfpeek Command Line Syntax

The format of cfpeek invocation is:

cfpeek options file [keys]

where options are command line options, file is the configuration file to operate upon, and optional keys are pathnames of the keywords to locate in that configuration file.

If keys are supplied, cfpeek, for each key, looks up in the parse tree for any nodes matching the key and prints them on the standard output. An error message is displayed for any key which has no matching statements in the input file. In this case, program continues iterating over the rest of keys. When the list is exhausted, cfpeek will exit with the status 1 (see Exit Codes).

If either -f (--file) or -e (--expression) has been given, a Scheme expression or the default cfpeek function is evaluated for each matching node. If -e (--expression) is given, the node is passed to it in the global ‘node’ variable. Otherwise, if -f (--file) is given, the node is passed as argument to cfpeek function.

If both --file=script and --expression=expression options are given, the script file script is loaded first, and the expression is evaluated for each matching node. The expression can then refer to any variables and call any functions defined in the script.

If no keys are supplied, the program operates as if given a single ‘.*’ key (see Patterns), which matches any node in the parse tree (i.e., it iterates over the entire parse tree).

Cfpeek User Manual (split by section):   Section:   Chapter:FastBack: Formats   Up: Top   FastForward: Exit Codes   Contents: Table of ContentsIndex: Concept Index