Home
Cfpeek User Manual - The GNU Operating System
Contents
1. 11 e e short option summary 27 escape SEQueNCE nennen nenn 19 exit CO dei 31 expression expression option introduced 222 do dores 11 expression expression option SUIMMALY 4 i rere see eigenen eed nii 27 F f f short option introduced 12 f f short option summary 2 FDL GNU Free Documentation License 39 file file option introduced 12 file file option summary 24 format format option in statement look UPS e ise eet rr mer fr WS 9 format format option introduced 7 format format option summary 26 format input eee eee 17 G GIT Configuration Converter 13 git configuration format 22 globbing pattern 2222 10 globbing patterns 25 grecs configuration format Er grecs find node 34 grecs match first 34 grecs match next 0 35 grecs node block 34 grecs node down 13 33 grecs node down 04 33 grecs node has value 34 grecs node head 04 33 48 grecs node ident 34 grecs node locus 0005 34 grecs node next ss 13 33 grecs node next sus 33 grecs node path 34 grecs node path list
2. 34 grecs node prev suus 34 grecs node prev usas een 33 grecs node root kez si 33 grecs node root 2222er 34 grecs node stmt 222c seen 34 grecs node tail suus 33 grecs node type sss 13 34 grecs nod p dissi ees 33 grecs node u p siseses ees metes 33 grecs node value 34 a A ia kake si 33 Guille sisse e cence RE use 11 H H short option in statement look ups pole necne see rel ete a on inp neg Eee 9 H H short option introduced 7 h h short option summary 29 H H short option summary 26 help help option summary 29 here document seeeessss 19 I I I short option summary 28 identilier ser we kiere ies 5 include directory include directory option SUMMALY ceo es 28 input formats 000 10 17 o AAA kesz RBS 10 K A geria 5 L L L short option described 10 l l short option summary 28 L L short option summary 27 lang lang option summary 28 i Em 20 literal literal option described vba oar meis ee eed 10 Cfpeek User Manual literal literal option summary Tv PR 27 LI rr 26 look up key 00 cee cece eee eee eee 8 M m m short option summary 27 DA ani catia hota ees wees tessa Gules 20 matches matches o
3. 9 q q short option summary 26 quiet quiet option described 9 quiet quiet option summary 26 QUO iia 26 NO A b rere I ex br bois 26 quoted string 0 00 19 R r r short option summary 27 reduce reduce option summary 27 relative pathname 6 root statement esee 5 S s s short option summary 27 S S short option summary 27 Scheme asien ere TA 11 SCLIPUS bue ae b ee Xr POET OPER 11 Search key ana rt PO ERE 8 SECON ses ee 5 set set option summary 27 simple statement 5 simple statements 1 18 single line comments 17 sort sort option summary 27 Start Up SClipts ss iced inact eden es 9 statement look up 8 statement block 20 49 statement simple 18 statement subordinate 5 statements configuration file 18 string quoted 0 cece eee eee 19 string unquoted 006 18 structured configuration file 1 subordinate statement 5 substatement sseeeeeee esee 9 tag in a compound statement 9 MP estaba qu wardens dasha wade eres 10 26 usage usage option summary 29 V V short option summary 29 Valle iuo edu bo Dd edo bu
4. newline descend into subnodes loop grecs node down node continue from the next node loop grecs node next node type grecs node stmt print the simple statement display tab display grecs node ident node display display grecs node value node Chapter 3 Tutorial 15 newline continue from the next node loop grecs node next node If run on our sample configuration file it produces cfpeek f togit scm sample conf core user smith group mail pidfile var run example logging facility daemon tag example program a command a out program a logging facility localO tag a program b command b out wait yes pidfile var run b pid Chapter 4 Supported Configuration File Formats 17 4 Supported Configuration File Formats Cfpeek is able to handle input files in several formats The supported for mats differ mostly in syntax This chapter describes them in detail If you know of any free software which uses a structured configuration file not un derstood by cfpeek please let us know see Chapter 8 Reporting Bugs page 37 4 1 Grecs Configuration File This is the default input format It is used e g by GNU Dicot GNU Mailutils GNU Radius Mailfromd and others The configuration file consists of statements and comments There are three classes of lexical tokens keywords values and separators Blanks tabs newlines and comments co
5. grecs node locus node Scheme Procedure Returns source location of the node Returned value is a cons file name line number grecs find node node path Scheme Procedure Returns the first node whose path is path Starts search from node grecs match first node pattern Scheme Procedure Returns the first node whose path matches pattern The search is started from node Chapter 7 Scripting 35 grecs match next node Scheme Procedure Node must be a node returned by a previous call to grecs match first or grecs match next The function returns next node matching the initial pattern or tf if no more matches are found For example the following code iterates over all nodes matching pattern define iterate nodes root pattern thunk do node grecs match first root pattern grecs match next node not node thunk node Chapter 8 How to Report a Bug 37 8 How to Report a Bug Please report bugs and suggestions to bug cfpeekOgnu org ua You hit a bug if at least one of the conditions below is met e cfpeek terminates on signal 11 SIGSEGV or 6 SIGABRT e cfpeek terminates with exit code 70 internal software error e The program fails to do its job as described in this manual If you think you ve found a bug please be sure to include maximum information available to reliably reproduce it or at least to analyze it The information needed is e Version of the package you are using e Command line op
6. GIT section header corresponding to its node It ascends the parent node chain to find the topmost node and prints the traversed nodes in the correct order To summarize here is the listing of the togit scm script define print section node delim Print a Git section header for the given node End it with delim The function recursively calls itself until the topmost node is reached cond grecs node up node Ascend to the parent node print section grecs node up node space 14 Cfpeek User Manual Print its identifier display grecs node ident node if grecs node has value node 33 value begin display display grecs node value node and delimiter display delim else mark the root node display witha define cfpeek node Main entry point Calls itself recursively to descend into subordinate nodes and to iterate over nodes on the same nesting level tail recursion let loop node node if node let type grecs node type node cond type grecs node root let dn grecs node down node Each statement in a Git config file must belong to a section If the first node is not a block statement provide the default core section if not grecs node type dn grecs node block display core n Continue from the first node loop dn type grecs node block print the section header print section node
7. dnos 5 value en 8 26 version version option summary m cm 29 Wildcards Seesen AR 25 x x short option summary 28 X X short option summary 28 X resources 2 ee eee eene 21
8. ee 7 3 5 Statement Lookups ss iile ede pu RR ia eee Pe 8 3 6 Pattern Lookups 0 00 cece eee e 10 3 7 Using Various Parsers 2 sce c eee ekben eene 10 3 8 Specifying Nodes to Output 10 3 9 Using Scripts 00 c cece eee emn 11 3 9 1 Example Converter to GIT Configuration Format 13 4 Supported Configuration File Formats 17 4 1 Grecs Configuration File 6 cece eee eee 17 V Comments mitad ers 17 4 1 2 Pragmatic Comments sssesssseseees eee ees 17 AAS Statements sse e x ud ebb Nee eon eee 18 ANA Pr proCesSOr s c me deed sakes d RARO COELI SURE 20 4 2 Path Configuration File 0 00 21 4 3 BIND Configuration File 0 0 cece eee eee 21 4 4 MeTA1 Configuration File 0 0 cece eee eee 22 4 5 GIT Configuration File 0 0 cece eee eee 22 5 Cfpeek Command Line Syntax 25 Dal alters PORA E Gate au EEE kt k rba 25 5 2 Output Control nana enges 26 5 3 Modifiers s mos ner essen 27 5 4 Senpung Options nn seen ER IARE ERR a ap 27 5 5 Preprocessor Control Options 00 cece eee eee eee eee 28 5 6 Debugging Options 00 c cece n 28 5 7 Informational Options 0 0 0 e cece eee eee es 29 6 Exit Codes cci du orn dol cca ca olo eden Was 31 i WORDING er UC ep ENDE Ro a 33 iv Cfpeek User Manual 8 How to Report a Bug 37 Appendix A GNU Free Documentation License A I
9. except that it does not support neither here documents not list values Some of its features such as acls and allow lists do resemble lists but are not them in reality Such suspi cious statements are represented as simple statements For example the following statement in named conf allow transfer 1 allow dns 22 Cfpeek User Manual 110 10 10 1 10 10 10 0 8 Fs allow transfer allow dns allow transfer 10 10 10 1 allow transfer 10 10 10 0 8 Another exception is the controls statement which doesn t fall well into the general syntax of BIND configuration file Therefore a special rule is applied to handle it In the effect the following statement controls inet 127 0 0 1 port 953 allow 127 0 0 1 127 0 0 2 keys rndc key F produces controls inet 127 0 0 1 port 953 allow 127 0 0 1 127 0 0 2 keys rndc key 4 4 MeTA1 Configuration File This type of configuration file is used by MeTA1 an advanced MTA pro gram See http www metai org for details about the program and its configuration The syntax is similar to both Grecs and Bind in that it uses curly braces to delimit subordinate statements The syntax for strings is similar to Grecs see Section 4 1 3 quoted string page 18 As in Grecs adjacent quoted strings are concatenated to produce a single string The principal syntactic differences are e Only comme
10. number A number is a sequence of decimal digits boolean A boolean value is one of the following yes true t or 1 meaning true and no false nil 0 meaning false unquoted string An unquoted string may contain letters digits and any of the following characters _ 7 99 2 Chapter 4 Supported Configuration File Formats 19 quoted string A quoted string is any sequence of characters enclosed in double quotes A backslash appearing within a quoted string in troduces an escape sequence which is replaced with a single character according to the following rules Sequence Replaced with a Audible bell character ASCII 7 b Backspace character ASCII 8 f Form feed character ASCII 12 n Newline character ASCII 10 r Carriage return character ASCII 13 t Horizontal tabulation character ASCII 9 v Vertical tabulation character ASCII 11 XN A single backslash A double quote Table 4 1 Backslash escapes In addition the sequence newline is removed from the string This allows to split long strings over several physical lines e g a long string may be split over several lines If the character following a backslash is not one of those specified above the backslash is ignored and a warning is issued Two or more adjacent quoted strings are concatenated which gives another way to split l
11. of the Document and likewise the network locations given in the Document for previous versions it was based on These may be placed in the History section You may omit a network location for a work that was published at least four years before the Document itself or if the original publisher of the version it refers to gives permission K For any section Entitled Acknowledgements or Dedications Preserve the Title of the section and preserve in the section all the substance and tone of each of the contributor acknowledgements and or dedications given therein L Preserve all the Invariant Sections of the Document unaltered in their text and in their titles Section numbers or the equivalent are not considered part of the section titles M Delete any section Entitled Endorsements Such a section may not be included in the Modified Version N Do not retitle any existing section to be Entitled Endorsements or to conflict in title with any Invariant Section O Preserve any Warranty Disclaimers If the Modified Version includes new front matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document you may at your option designate some or all of these sections as invariant To do this add their titles to the list of Invariant Sections in the Modified Version s license notice These titles must be distinct from any other section titles You may add a section E
12. preserve all their Warranty Disclaimers The combined work need only contain one copy of this License and multiple identical Invariant Sections may be replaced with a single copy If there are multiple Invariant Sections with the same name but different contents make the title of each such section unique by adding at the end of it in parentheses the name of the original author or publisher of that section if known or else a unique number Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work In the combination you must combine any sections Entitled History in the various original documents forming one section Entitled His tory likewise combine any sections Entitled Acknowledgements and any sections Entitled Dedications You must delete all sections Enti tled Endorsements COLLECTIONS OF DOCUMENTS You may make a collection consisting of the Document and other docu ments released under this License and replace the individual copies of this License in the various documents with a single copy that is included in the collection provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects You may extract a single document from such a collection and distribute it individually under this License provided you insert a copy of this License into the extracted document and follow this Licen
13. q quiet Suppress error diagnostics See Section 3 5 quiet page 8 Chapter 5 Cfpeek Command Line Syntax 27 5 3 Modifiers The following options modify the way cfpeek processes the parse tree and search keys L literal Use literal matching instead of pattern matching See literal page 10 2g sort Before further processing sort parse tree lexicographically in ascending order _m matches number Output at most number matches for each key p parser type Set parser type for the input file The argument is one of grecs path metal bind and git case insensitive See Chapter 4 Formats page 17 for a description of each type 6 r reduce Reduce the parse tree so that each keyword occurs no more than once at each tree level s path val set path val Set a keyword path to value The produced parse tree node will be processed as usual 5 4 Scripting Options The following options control the scripting facility of cfpeek e expression expression expression Apply this expression to each node found The global variable node is set to the node being processed before evaluating When used together with file script the expression can refer to any variables and call any functions defined in the script file f file file file Load the script file Unless expre
14. the modifications in the Modified Version together with at least five of the principal authors of the Document all of its principal authors if it has fewer than five unless they release you from this requirement C State on the Title page the name of the publisher of the Modified Version as the publisher D Preserve all the copyright notices of the Document E Add an appropriate copyright notice for your modifications adja cent to the other copyright notices F Include immediately after the copyright notices a license notice giving the public permission to use the Modified Version under the terms of this License in the form shown in the Addendum below G Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document s license notice H Include an unaltered copy of this License I Preserve the section Entitled History Preserve its Title and add to it an item stating at least the title year new authors and publisher of the Modified Version as given on the Title Page If Appendix A GNU Free Documentation License 43 there is no section Entitled History in the Document create one stating the title year authors and publisher of the Document as given on its Title Page then add an item describing the Modified Version as stated in the previous sentence J Preserve the network location if any given in the Document for public access to a Transparent copy
15. zone statements no their subordinate state ments The parent flag act in the similar manner but it identifies the ancestor by its keyword instead of the relative nesting level The statement format parent zone tells cfpeek after finding a matching node to ascend until a node with the identifier zone is found and then print this node 3 9 Using Scripts Cfpeek offers a scripting facility which can be used to easily extend its functionality beyond the basic operations described in previous chapters Scripts must be written in Scheme using Guile the GNU s Ubiquitous Intelligent Language for Extensions For information about the language refer to Section Top in Revised 5 Report on the Algorithmic Language Scheme For a detailed description of Guile and its features see Section Overview in The Guile Reference Manual This section assumes that the reader has sufficient knowledge about this programming language The scripting facility is enabled by the use of the expression e of file f command line options The expression e option takes as its argument a Scheme expression which will be executed for each statement matching the supplied keys or for each statement in the tree if no keys were supplied The expression can obtain information about the statement from the global variable node which represents a node in the parse tree describing this statement The
16. Cfpeek User Manual version 1 0 26 May 2011 Sergey Poznyakoff Copyright c 2011 Sergey Poznyakoff Permission is granted to copy distribute and or modify this document un der the terms of the GNU Free Documentation License Version 1 3 or any later version published by the Free Software Foundation with no Invariant Sections with the Front Cover texts being Cfpeek User Manual and with the Back Cover Texts as in a below A copy of the license is included in the section entitled GNU Free Documentation License a The Back Cover Text is You have freedom to copy and modify this manual like Free Software Short Contents rFaeNrnaarwhNnN HM imir d ti n erteilen 1 Overview of this Manual sister EGER 3 Mi arcane ose th A oat Re its Ber aE E 5 Supported Configuration File Formats T Cfpeek Command Line Syntax 25 Exit COS au raia ch Byes WO do EIER PACHOR 31 DOPIDUIBE nassen a a ada 33 How to Report a DUE adu wien ru aO ale p dC vs 37 GNU Free Documentation License ooooooooo o o 39 Concept Index a ke eorr a ee eae gus en 47 ii Table of Contents 1 Introguchen neuen 1 2 Overview of this Manual 3 3 Tutorial corts ed E ES adt ol obierat e RON IER 5 31 Basic NOUOnS eerte acere Cer a 5 3 2 PallinamlesS sk kinok ier be ii id 5 3 3 Example Configuration esses 6 3 4 Listing the Entire File 00 cece
17. TT 39 A 1 ADDENDUM How to use this License for your documents 46 Concept Index escuche wean eR we easton 47 Chapter 1 Introduction 1 1 Introduction Many programs keep their configurations in files with hierarchical structure Such files normally define sections which keep logically separated blocks of statements These statements may in turn contain subsections and so on On the lowest level of hierarchy are simple statements which normally define some basic configuration settings Quite often a need arises to parse such files outside of their owner pro gram For example one may need to retrieve some configuration settings to use them in a start up script for that program to produce a similar configu ration file with some settings changed in order to use it on another machine or to convert entire file into another format for interaction with some other utility Cfpeek is a utility designed to handle any of these tasks Chapter 2 Overview of this Manual 3 2 Overview of this Manual This book consists of the three main parts The first part is a tutorial which provides a gentle as far as possible introduction for those who are new to cfpeek The tutorial should help the reader to familiarize himself with the program and to start using it It does not however cover some of the less frequently used features of cfpeek The chapters that follow complement the tutorial They describe various input file formats understoo
18. above and you may publicly display copies 3 COPYING IN QUANTITY If you publish printed copies or copies in media that commonly have printed covers of the Document numbering more than 100 and the Document s license notice requires Cover Texts you must enclose the copies in covers that carry clearly and legibly all these Cover Texts Front Cover Texts on the front cover and Back Cover Texts on the back cover Both covers must also clearly and legibly identify you as the publisher of these copies The front cover must present the full title with all words of the title equally prominent and visible You may add other material on the covers in addition Copying with changes limited to the covers as long as they preserve the title of the Document and satisfy these conditions can be treated as verbatim copying in other respects If the required texts for either cover are too voluminous to fit legibly you should put the first ones listed as many as fit reasonably on the actual cover and continue the rest onto adjacent pages If you publish or distribute Opaque copies of the Document numbering more than 100 you must either include a machine readable Transparent copy along with each Opaque copy or state in or with each Opaque 42 Cfpeek User Manual copy a computer network location from which the general network using public has access to download using public standard network protocols a complete Transparent copy of the Documen
19. am block statement whose tag begins with mh 5 2 Output Control H flags format flags Set output format flags The argument is a comma separated list of format flags The following flags control which nodes are printed parent keyword For each matching node look for its parent node with the given keyword and print it instead up n For each matching node ascend n parent nodes and print the node at which the ascent stopped The delim flag controls how keyword paths is printed delim char Sets path component delimiter instead of the de fault The following flags control the amount of information printed for each node These are boolean flags when prefixed with no they have the meaning opposite to the described locus Print source location of each configuration state ment A location is printed as the file name followed by a semicolon followed by the line number and an other semicolon Locations are separated from the rest of output by a single space character path Print statement paths value Print statement values quote Always quote string values never quote Never quote string values quote hex Print non printable characters as C hex escapes This option is ignored if noquote is set descend Descend into subnodes Set default options The default format options are path value quote descend
20. bination of the three merge those two alternatives to suit the situation If your document contains nontrivial examples of program code we rec ommend releasing these examples in parallel under your choice of free soft ware license such as the GNU General Public License to permit their use in free software Concept Index Concept Index This is a general index of all issues discussed in this manual iinclude 2 lat 17 include once sss 18 Ele isidro 18 ll AAA 10 hy a wildcard AAA 25 a wildcard eese es 10 a Wildcard olv ic PPS 25 file and expression used together eme eee rw e 12 25 absolute pathname 6 bind configuration format 21 block statement 5 20 boolean value 18 cfpeek Scheme function 27 child statement 5 Comments in a configuration file 17 comments pragmatic sess LT compound statement 5 configuration file statements 18 D D short option summary 28 debug lexer debug lexer option Summary u wann ann habes 28 debug parser debug parser option SUMMALY sun 28 47 detalle miis iaa nn 26 define define option summary 28 delim esame RR CU ais 26 delim format flag 8 descend chews eR tds ERES 8 26 E e e short option introduced
21. ced on the same line with its terminating delimiter as in help text lt lt EOT A sample help text EOT list A list is a comma separated list of values Lists are enclosed in parentheses The following example shows a statement whose value is a list of strings alias test null In any case where a list is appropriate a single value is allowed without being a member of a list it is eguivalent to a list with a single member This means that e g alias test is eguivalent to alias test A block statement introduces a logical group of statements It consists of a keyword followed by an optional value and a seguence of statements enclosed in curly braces as shown in the example below server srvi host 10 0 0 1 community foo The closing curly brace may be followed by a semicolon although this is not required 4 1 4 Preprocessor Before actual parsing the configuration file is preprocessed The built in pre processor handles only file inclusion and line statements see Section 4 1 2 Chapter 4 Supported Configuration File Formats 21 Pragmatic Comments page 17 while the rest of traditional preprocess ing facilities such as macro expansion is supported via m4 which serves as external preprocessor The detailed description of m4 facilities lies far beyond the scope of this document You will find a complete user manual in Section GNU M4 in GNU M4 macro processor For the rest of this subsectio
22. command b out pidfile var run b pid logging 1 tag aj program b wait yes Example 3 1 Sample configuration file 3 4 Listing the Entire File The only argument cfpeek requires is the name of the file to parse If no other arguments are given it produces on the standard output a listing of that file in pathname value form Each simple statement in the input file is represented by a single line in the output listing The line consists of two main parts the full pathname of that statement and its value The two parts are separated by a colon and space character For example cfpeek sample conf user smith group mail pidfile var run example logging facility daemon logging tag command a out logging facility local0 logging tag a program a program a program a program b wait yes program b program b example command b out pidfile var run b pid 8 Cfpeek User Manual This output can be customized via the format H command line option This option takes a list of output flags each of which modifies some aspect of the output Most output flags are boolean i e they enable or disable the given feature To disable the feature the flag must be prefixed with no To list only the pathnames use cfpeek format path sample conf user group pidfile logging facility logging tag program a command program a lo
23. ctions You may include a translation of this License and all the license notices in the Document and any Warranty Disclaimers pro vided that you also include the original English version of this License and the original versions of those notices and disclaimers In case of a disagreement between the translation and the original version of this License or a notice or disclaimer the original version will prevail If a section in the Document is Entitled Acknowledgements Dedi cations or History the requirement section 4 to Preserve its Title section 1 will typically require changing the actual title TERMINATION You may not copy modify sublicense or distribute the Document ex cept as expressly provided for under this License Any other attempt to copy modify sublicense or distribute the Document is void and will automatically terminate your rights under this License However par ties who have received copies or rights from you under this License will not have their licenses terminated so long as such parties remain in full compliance FUTURE REVISIONS OF THIS LICENSE The Free Software Foundation may publish new revised versions of the GNU Free Documentation License from time to time Such new versions will be similar in spirit to the present version but may differ in detail to address new problems or concerns See http www gnu org copyleft Each version of the License is given a distinguishing version
24. d by the program and summarize command line syntax and options available to it These two chapters can be used as a reference by both beginners and for users familiar with the package Chapter 3 Tutorial 5 3 Tutorial The following typographic conventions are used throughout this tutorial In the examples represents a typical shell prompt It precedes lines you should type Both command line and lines which represent the program output are shown in this font The Scheme code is shown as follows do it In examples the symbol indicates the value of a variable or result of a function invocation as in xXx gt 2 3 1 Basic Notions A structured configuration file contains entities of two basic types First of them is simple statement A simple statement conceptually consists of an identifier or keyword and a value Depending on the syntactic require ments some special token may be required between them such as an equals sign for example or at the end of the statement The value though we use the term in singular is not necessarily a single scalar value it may as well be a list of values the exact form of that list depends on the particular syntax of the configuration file Another basic entity is compound statement also known as block state ment or section Compound statement is used for logical grouping of other statements It consists of identifier an optional tag and a list of statements The tag if pr
25. ee it uses the same output format as with full listings If you wish to change it use the format option introduced in the previous section For example to retrieve only the value cfpeek format value sample conf pidfile var run example This approach is quite common when cfpeek is used in shell scripts It will be illustrated in more detail below If a key is not found cfpeek prints a message on the standard error and starts searching for the next key if any When all keys are exhausted the program exits with status 1 to indicate that some of them have not been found To suppress the diagnostics output use the quiet q option To illustrate all this the following example shows how to use cfpeek in a start up script to check whether a program has already been started and to bring it down if requested bin sh pidfile cfpeek q format value sample conf pidfile if test f pidfile then pid head 1 pidfile else pid fi case 1 in start if test n pid then echo gt amp 2 the program is already running else start the program sample start fi status if test n pid then echo program is running at pid pid else echo program is not running fi stop test n pid amp amp kill TERM pid esac 10 Cfpeek User Manual 3 6 Pattern Lookups Apart from literal pathname a pathname pattern is allowed as a key A pattern can contain wildcards in place of pat
26. esent is similar to the value in simple statements The same notes that we made about values apply to tags as well Tags serve to discern between the statements having the same identifier The list of statements may include statements of both kinds simple as well as compound ones Thus compound statements form a tree like structure of arbitrary depth with simple statements as leaf nodes Each compound statement can have any number of subordinate state ments which are called its child statements Each statement no matter simple or compound has only one parent statement i e a compound state ment of which it is a child A special implicit statement called root statement serves as the parent for the statements at the topmost level of hierarchy 3 2 Pathnames Given this hierarchical structure each statement can be identified by the list of keywords and values when present of all compound statements that must be traversed in order to reach that statement Such a list written according to a set of conventions is called a full pathname of the statement The conventions are 6 Cfpeek User Manual 1 Pathname is written from top down 2 An untagged statement is represented by its identifier 3 A tagged statement is represented by its identifier immediately followed by an equals sign followed by the tag 4 Identifiers and values which contain whitespace double quotes or dots are enclosed in double quotes 5 Within double q
27. first Simple statements must occur only within a section In other words each non empty configuration file must contain at least one section String values may be entirely or partially enclosed in double quotes sim ilarly to shell syntax The following escape sequences are recognized within a value Sequence Stands for m m AV N b Backspace ASCII 8 RL Horizontal tab ASCII 9 n Newline ASCII 10 A backslash immediately preceding a newline indicates line continuation Both characters are removed and the remaining characters are joined with line that follows Chapter 5 Cfpeek Command Line Syntax 25 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 Chapter 6 Exit Codes page 31 If either file or e expression has been given a Scheme expression or the default cfpeek function is evaluated for each matchi
28. g level grecs node prev node Scheme Procedure Returns t if node is preceded by another node on the same nesting level 34 Cfpeek User Manual grecs node prev node Scheme Procedure Returns the node preceding node on the same nesting level grecs node ident node Scheme Procedure Returns identifier of the node node grecs node path list node Scheme Procedure Returns the full path to the node converted to a list Each list element corresponds to a subnode identifier A subnode which has a tag is repre sented by a cons whose car contains the subnode identifier and cdr its value For example the following path foo bar x baz is represented as foo bar x baz grecs node path node delim Scheme Procedure Returns the full path to the node a string grecs node type node Scheme Procedure Returns the type of the node The following constants are defined grecs node root The node is a root node The following is always t and grecs node type node grecs node root not grecs node up node not grecs node prev node grecs node stmt The node is a simple statement The following is always tt and grecs node type node grecs node stmt not grecs node down node grecs node block The node is a block statement grecs node has value node Scheme Procedure Returns t if node has a value grecs node value node Scheme Procedure Returns the value of node
29. gging facility program a logging tag program b command program b wait program b pidfile The default output is equivalent to format path value descend The flags path and value mean to print the pathname of the statement and its value The descend flag affects the output of compound nodes If this flag is set and a node matching the key is a compound node cfpeek will output this node and all nodes below it i e its descendant nodes The descend flag is meaningful only if at least one lookup key is supplied You can also use format to change the default component delimiter For example to use slash to delimit components cfpeek format delim sample conf user smith group mail pidfile var run example logging facility daemon logging tag example program a command a out program a logging facility localO program a logging tag a program b command b out program b wait yes program b pidfile var run b pid 3 5 Statement Lookups When given more than one argument cfpeek treats the rest of arguments as search keys It then searches for statements with pathnames matching each of the keys and outputs them A key can be either a pathname or a pattern Chapter 3 Tutorial 9 The following command looks for the pidfile statement at the topmost level of hierarchy and prints it cfpeek sample conf pidfile pidfile var run example As you s
30. h components Two wildcards are defined and A matches any single keyword cfpeek sample conf pidfile program b pidfile var run b pid A wildcard matches zero or more keywords appearing in its place cfpeek sample conf pidfile pidfile var run example program b pidfile var run b pid In addition to these wildcards tags in a pattern can contain traditional globbing patterns as described in Section match filename or pathname in fnmatch 3 man page cfpeek sample conf program ab pidfile program b pidfile var run b pid Pattern lookups can be disabled using the literal L command line option There may be two reasons for doing so First literal lookups are somewhat faster so if you don t need pattern matching using literal can save you a couple of CPU cycles Secondly if any of your identifiers contain or characters you will have to use literal to prevent them from being treated as wildcards 3 7 Using Various Parsers Cfpeek can handle input files in various formats The default one is Grecs format introduced in previous sections To process input files of another format specify the parser to use via the parser p command line option The argument to this option is one of grecs bind path metal or git See Chapter 4 Formats page 17 for a detailed description of each
31. it in the current working directory first and if not found there in the include search path The default include search path is 1 prefix share program name 1 0 include 2 prefix share program name include where prefix is the installation prefix include_once lt file gt include_once file Same as include except that if the file has already been in cluded it will not be included again line num line num file This line causes the parser to believe for purposes of error di agnostics that the line number of the next source line is given by num and the current input file is named by file If the latter is absent the remembered file name does not change num file This is a special form of line statement understood for com patibility with the C preprocessor In fact these statements provide a rudimentary preprocessing features For more sophisticated ways to modify configuration before parsing see Section 4 1 4 Preprocessor page 20 4 1 3 Statements A simple statement consists of a keyword and value separated by any amount of whitespace Simple statement is terminated with a semicolon The following is a simple statement standalone yes pidfile var run slb pid A keyword begins with a letter and may contain letters decimal digits underscores _ and dashes Examples of keywords are expression output file A value can be one of the following
32. llectively called white space are ignored except as they serve to separate tokens Some white space is required to separate otherwise adjacent keywords and values 4 1 1 Comments Comments may appear anywhere where white space may appear in the con figuration file There are two kinds of comments single line and multi line comments Single line comments start with or and continue to the end of the line This is a comment This too is a comment Multi line or C style comments start with the two characters slash star and continue until the first occurrence of star slash Multi line comments cannot be nested However single line comments may well appear within multi line ones 4 1 2 Pragmatic Comments Pragmatic comments are similar to usual single line comments except that they cause some changes in the way the configuration is parsed Pragmatic comments begin with a sign and end with the next physical newline character include lt file gt include file Include the contents of the file file If file is an absolute file name both forms are equivalent Otherwise the form with angle See Section Top in GNU Dico Manual See Section Top in GNU Mailutils Manual See Section Top in GNU Radius Manual See Section Top in Mailfromd Manual e N E 18 Cfpeek User Manual brackets searches for the file in the include search path while the second one looks for
33. ly XYZ or contains XYZ in parentheses fol lowing text that translates XYZ in another language Here XYZ stands for a specific section name mentioned below such as Acknowledge ments Dedications Endorsements or History To Preserve the Title of such a section when you modify the Document means that it remains a section Entitled XYZ according to this definition The Document may include Warranty Disclaimers next to the notice which states that this License applies to the Document These Warranty Disclaimers are considered to be included by reference in this License but only as regards disclaiming warranties any other implication that these Warranty Disclaimers may have is void and has no effect on the meaning of this License 2 VERBATIM COPYING You may copy and distribute the Document in any medium either com mercially or noncommercially provided that this License the copyright notices and the license notice saying this License applies to the Docu ment are reproduced in all copies and that you add no other conditions whatsoever to those of this License You may not use technical mea sures to obstruct or control the reading or further copying of the copies you make or distribute However you may accept compensation in ex change for copies If you distribute a large enough number of copies you must also follow the conditions in section 3 You may also lend copies under the same conditions stated
34. n we assume the reader is sufficiently acquainted with m4 macro processor The external preprocessor is invoked with s flag which instructs it to include line synchronization information in its output This information is then used by the parser to display meaningful diagnostic An initial set of macro definitions is supplied by the pp setup file lo cated in prefix share program name 1 0 include directory The default pp setup file renames all m4 built in macro names so they all start with the prefix m4_ This is similar to GNU m4 prefix builtin option but has an advantage that it works with non GNU m4 implementa tions as well 4 2 Path Configuration File A pathname configuration file format corresponds exactly to the default out put format of cfpeek i e it lists each terminal keyword as its full pathname followed by a semicolon a single space and its value as in the example below user smith group mail pidfile var run example logging facility daemon logging tag example program a command a out program a logging facility localO program a logging tag a program b command b out program b wait yes program b pidfile var run b pid This format is similar to the one used in X resources 4 3 BIND Configuration File This is the format used by the ISC BIND configuration files In general it is pretty similar to the Grecs
35. ng 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 Section 5 1 Patterns page 25 which matches any node in the parse tree i e it iterates over the entire parse tree 5 1 Patterns By default cfpeek treats keys as wildcard patterns When matching state ment identifiers keywords two characters have special meaning and x A character in place of an identifier matches any single keyword Thus e g cfpeek file conf bar baz will match foo bar baz qux bar baz but will not match bar baz or x y bar baz A single character in place of a keyword matches zero or more keywords appearing in its place so that cfpeek file conf bar baz The tags in block statement are matched using the traditional globbing patterns See Section match filename or pathname in fnmatch 3 man page For example this 26 Cfpeek User Manual cfpeek file conf program mh will match any progr
36. node contains complete in formation about the statement including its location in the source file its type and neighbor nodes etc number of functions is provided to retrieve that information from the node These functions are discussed in detail in Chapter 7 Scripting page 33 Let s start from the simplest example The following command prints all nodes in the file cfpeek expression display node newline sample conf 12 Cfpeek User Manual lt node user smith lt node group mail lt node pidfile var run example gt lt node logging facility daemon gt lt node logging tag example gt lt node program a command a out gt lt node program a logging facility local0 gt lt node program a logging tag a gt lt node program b command b out gt lt node program b wait yes gt lt node program b pidfile var run b pid gt The format shown in this example is the default Scheme representation for nodes You can use accessor functions to format the output to your liking For instance the function grecs node locus returns the location of the node in the input file The returned value is a cons with the file name as its car and the line number as its cdr Thus you can print statement locations with the following command cfpeek expr let loc grecs node locus format t A 7A7 car loc cdr loc sample conf Complex ex
37. ntitled Endorsements provided it contains nothing but endorsements of your Modified Version by various parties for example statements of peer review or that the text has been ap proved by an organization as the authoritative definition of a standard You may add a passage of up to five words as a Front Cover Text and a passage of up to 25 words as a Back Cover Text to the end of the list of Cover Texts in the Modified Version Only one passage of Front Cover Text and one of Back Cover Text may be added by or through ar rangements made by any one entity If the Document already includes a cover text for the same cover previously added by you or by arrange ment made by the same entity you are acting on behalf of you may not add another but you may replace the old one on explicit permission from the previous publisher that added the old one 44 Cfpeek User Manual The author s and publisher s of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version COMBINING DOCUMENTS You may combine the Document with other documents released under this License under the terms defined in section 4 above for modified versions provided that you include in the combination all of the Invari ant Sections of all of the original documents unmodified and list them all as Invariant Sections of your combined work in its license notice and that you
38. nts are understood e An equal sign is required between identifier and value in simple state ments e g log level 12 e List values are enclosed in curly braces e Here document is not supported 4 5 GIT Configuration File This is the format used by Git http git scm com It is described in detail in See Section CONFIGURATION FILE in git config 1 man page The syntax is line oriented Comments are introduced by or char acter and extend up to the next physical newline Statements are delimited by newlines The syntax for simple statement is ident value Chapter 4 Supported Configuration File Formats 23 Compound statements or sections begin with a section header ie a full pathname of that section using single space as a separator and enclosed in a pair of square brackets Any identifier in the path which contains whitespace characters must be quoted using double quotes Double quotes and backslashes appearing in a section name must be escaped as and AV correspondingly For example section subsection name subsubsection An alternative syntax for section headers is a full pathname of the section using single dot as a separator and enclosed in a pair of square brackets When this syntax is used whitespace is not allowed in section names section subsection subsubsection A section begins with the section headers and continues until the start of next section or end of file whichever occurs
39. number If the Document specifies that a particular numbered version of this License or any later version applies to it you have the option of following the terms and conditions either of that specified version or of any later version that has been published not as a draft by the Free Software Foundation If the Document does not specify a version number of this License you may choose any version ever published not as a draft by the Free Software Foundation 46 Cfpeek User Manual A 1 ADDENDUM How to use this License for your documents To use this License in a document you have written include a copy of the License in the document and put the following copyright and license notices just after the title page Copyright C jyear your name Permission is granted to copy distribute and or modify this document under the terms of the GNU Free Documentation License Version 1 2 or any later version published by the Free Software Foundation with no Invariant Sections no Front Cover Texts and no Back Cover Texts A copy of the license is included in the section entitled GNU Free Documentation License If you have Invariant Sections Front Cover Texts and Back Cover Texts replace the with Texts line with this with the Invariant Sections being list their titles with the Front Cover Texts being list and with the Back Cover Texts being list If you have Invariant Sections without Cover Texts or some other com
40. of these formats For example to select zone statements from the etc named conf file cfpeek parser bind etc named conf zone 3 8 Specifying Nodes to Output Sometimes you may need to see not the node which matched the search key but its parent or other ancestor node Consider for example the following task select from the etc named conf file the names of all zones for which this nameserver is a master To do so you will need to find all zone type statements with the value master ascend to the parent node and print its value Cfpeek provides two special formatting flags to that effect up and parent Both flags are used with the format option Chapter 3 Tutorial 11 The up flag requires an integer number as its argument It instructs cfpeek to ascend that many parent nodes before actually printing the node For example format up 1 means ascend to the parent of the matched node and print it This is exactly what we need to solve the above task since the type statement is a child of a zone statement Thus the solution is cfpeek format up 1 nodescend value parser bind etc named conf type master The value flag indicates that we want on output only values without the corresponding pathnames The nodescend flag tells cfpeek to not descend into compound statements when outputting them It is necessary since we want only values of all relevant
41. ong strings over several lines to im prove readability The following fragment produces the same result as the example above a long string may be split over several lines Here document A here document is a special construct that allows to introduce strings of text containing embedded newlines The lt lt word construct instructs the parser to read all the fol lowing lines up to the line containing only word with possible trailing blanks Any lines thus read are concatenated together into a single string For example lt lt EOT A multiline string EOT 20 Cfpeek User Manual The body of a here document is interpreted the same way as a double quoted string unless word is preceded by a backslash e g lt lt EOT or enclosed in double quotes in which case the text is read as is without interpretation of escape sequences If word is prefixed with a dash then all leading tab characters are stripped from input lines and the line containing word Fur thermore if is followed by a single space all leading whitespace is stripped from them This allows to indent here documents in a natural fashion For example TEXT The leading whitespace will be ignored when reading these lines TEXT It is important that the terminating delimiter be the only token on its line T he only exception to this rule is allowed if a here document appears as the last element of a statement In this case a semicolon can be pla
42. pressions are cumbersome to type in the command line there fore the file f option is provided This option takes the name of the script file as its argument This file must define the function named cfpeek which takes a node as its argument The script file is then loaded and the cfpeek function is called for each matching node Now if we put the expression used in the previous example in a script file e g locus scm define cfpeek node let loc grecs node locus format t A A 4 car loc cdr loc then the example can be rewritten as cfpeek f locus scm sample conf When both file and expression options are used in the same invocation the cfpeek function is not invoked by default In fact it even does not need to be defined When used this way cfpeek first loads the requested script file and then applies the expression to each matching node the same way it always does when expression is supplied It is the responsibility of the expression itself to call any function or functions defined in the file This way of invoking cfpeek is useful for supplying additional parameters to the script For example cfpeek f script scm e process node node t input conf It is supposed that the function process node is defined somewhere in script scm and takes two arguments a node and a boolean Chapter 3 Tutorial 13 3 9 1 Example Converter to GIT Configura
43. pter describes the Scheme functions available for use in cfpeek scripts For an introduction to cfpeek scripting facility see Section 3 9 Scripts page 11 grecs node obj Scheme Procedure Returns t if obj is a valid tree node grecs node root node Scheme Procedure Returns the topmost node that can be traced up from node grecs node head node Scheme Procedure Returns the first node having the same parent and located on the same nesting level as node I e the following always holds true let head grecs node head node and eq grecs node up node grecs node up head not grecs node prev head grecs node tail node Scheme Procedure Returns the last node having the same parent and located on the same nesting level as node In other words the following relation is always t let tail grecs node tail node and eq grecs node up node grecs node up tail not grecs node next tail grecs node up node Scheme Procedure Return true if node has a parent node grecs node up node Scheme Procedure Return parent node of node grecs node down node Scheme Procedure Returns t if node has child nodes grecs node down node Scheme Procedure Returns the first child node of node grecs node next node Scheme Procedure Returns t if node is followed by another node on the same nesting level grecs node next node Scheme Procedure Returns the node following node on the same nestin
44. ption summary eat 27 MeTA1 configuration format 22 multi line comments 2222200 T N N N short option summary 28 never quote cssueib9Re RE beans 26 no preprocessor no preprocessor option summary 28 O E EEE EEE 27 node Guile variable 11 nodefault cir io E Rx wes 26 nodescend cierro daa 26 NOLO GUS s 52655 o eee pe ire 26 nonever quote eee eee 26 NOpathins cache ise naar nd 26 noquote ee e dada wera res 26 noquote hex os eR ee dna 26 NOVA VO seie Gg tances seas ba ote res 26 P p p short option described 10 p p short option summary 27 P P short option summary 28 parent iie een 11 26 parent statement esses 5 parser parser option described 10 parser parser option summary 27 Path anna e yt ag RES REDE 26 path configuration format 21 path format flag 8 E A ever n un 5 pathname absolute 6 pathname relative 6 pathname value listing 1 pattern is reds eres ees ene ars 10 25 bpssetup ans re 21 pragmatic comments 17 Dreprocessor vn Pu newest 20 preprocessor control 28 Concept Index preprocessor preprocessor option SUMMALY see E RR RE eer us 28 Q q q short option described
45. se Transparent file format whose markup or absence of markup has been arranged to thwart or discourage subsequent modi fication by readers is not Transparent An image format is not Trans parent if used for any substantial amount of text A copy that is not Transparent is called Opaque Examples of suitable formats for Transparent copies include plain ASCII without markup Texinfo input format LaTEX input format SGML or XML using a publicly available DTD and standard conforming simple HTML PostScript or PDF designed for human modification Examples of transparent image formats include PNG XCF and JPG Opaque for mats include proprietary formats that can be read and edited only by proprietary word processors SGML or XML for which the DTD and or processing tools are not generally available and the machine generated HTML PostScript or PDF produced by some word processors for output purposes only The Title Page means for a printed book the title page itself plus such following pages as are needed to hold legibly the material this License requires to appear in the title page For works in formats which do not have any title page as such Title Page means the text near the most prominent appearance of the work s title preceding the beginning of the body of the text Appendix A GNU Free Documentation License 41 A section Entitled XYZ means a named subunit of the Document whose title either is precise
46. se in all other respects regarding verbatim copying of that document AGGREGATION WITH INDEPENDENT WORKS A compilation of the Document or its derivatives with other separate and independent documents or works in or on a volume of a storage or distribution medium is called an aggregate if the copyright resulting from the compilation is not used to limit the legal rights of the com pilation s users beyond what the individual works permit When the Document is included an aggregate this License does not apply to the other works in the aggregate which are not themselves derivative works of the Document If the Cover Text requirement of section 3 is applicable to these copies of the Document then if the Document is less than one half of the entire Appendix A GNU Free Documentation License 45 10 aggregate the Document s Cover Texts may be placed on covers that bracket the Document within the aggregate or the electronic equivalent of covers if the Document is in electronic form Otherwise they must appear on printed covers that bracket the whole aggregate TRANSLATION Iranslation is considered a kind of modification so you may distribute translations of the Document under the terms of section 4 Replacing Invariant Sections with translations requires special permission from their copyright holders but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Se
47. ssion is also given the script must define the function named cfpeek which takes a node as its only argument This function will be called for each matching node 28 Cfpeek User Manual If expression is given this behavior is suppressed It is then the responsibility of the expression to call any functions defined in this file 1 script language lang script language Select scripting language to use This option is reserved for further use As of version 1 0 the only possible value for script language is scheme 5 5 Preprocessor Control Options The options described below control the preprocessor facility They are meaningful only for GRECS and BIND configuration files Preprocessor is not used for another configuration file formats Dname value define name value Define the preprocessor symbol name as having value or empty See Section 4 1 4 Preprocessor page 20 I dir include directory dir Add dir to include search path See Section 4 1 2 Pragmatic Comments page 17 CN no preprocessor Disable preprocessor see Section 4 1 4 Preprocessor page 20 P command preprocessor command Use command instead of the default preprocessor see Section 4 1 4 Preprocessor page 20 5 6 Debugging Options The options below enable trace output which helps understand how config uration parser works They are mainly useful for cfpeek de
48. t free of added material If you use the latter option you must take reasonably prudent steps when you begin distribution of Opaque copies in quantity to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy directly or through your agents or retailers of that edition to the public It is requested but not required that you contact the authors of the Document well before redistributing any large number of copies to give them a chance to provide you with an updated version of the Document MODIFICATIONS You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above provided that you release the Modified Version under precisely this License with the Modified Version filling the role of the Document thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it In addition you must do these things in the Modified Version A Use in the Title Page and on the covers if any a title distinct from that of the Document and from those of previous versions which should if there were any be listed in the History section of the Document You may use the same title as a previous version if the original publisher of that version gives permission B List on the Title Page as authors one or more persons or enti ties responsible for authorship of
49. the soft ware does But this License is not limited to software manuals it can be used for any textual work regardless of subject matter or whether it is published as a printed book We recommend this License principally for works whose purpose is instruction or reference APPLICABILITY AND DEFINITIONS This License applies to any manual or other work in any medium that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License Such a notice grants a world wide royalty free license unlimited in duration to use that work under the conditions stated herein The Document below refers to any such manual or work Any member of the public is a licensee and is addressed as you You accept the license if you copy modify or distribute the work in a way requiring permission under copyright law A Modified Version of the Document means any work containing the Document or a portion of it either copied verbatim or with modifica tions and or translated into another language A Secondary Section is a named appendix or a front matter section of the Document that deals exclusively with the relationship of the pub lishers or authors of the Document to the Document s overall subject or to related matters and contains nothing that could fall directly within 40 Cfpeek User Manual that overall subject Thus if the Document is in part a textbook of mathematics a Secondar
50. tion Format Here is a more practical example of Scheme scripting This script converts entire parse tree into a GIT configuration file format l he format itself is described in Section 4 5 git page 22 The script traverses entire tree itself so it must be called only once for the root node of the parse tree The root node is denoted by a single dot so the invocation syntax is cfpeek f togit scm sample conf Traversal is performed by the main function cfpeek using the grecs node next and grecs node down functions The grecs node next func tion returns a node which follows its argument at the same nesting level For example if n is the very first node in our sample parse tree then n lt node user smith gt grecs node next n lt node group mail Similarly the grecs node down function returns the first subordinate node of its argument For example n lt node logging gt grecs node down n gt lt node logging facility daemon Both functions return f if there are no next or subordinate node cor respondingly The grecs node type function is used to determine how to handle that particular node It returns a type of the node given to it as argument The type is an integer constant with the following possible values Type The node is grecs node root the root topmost node grecs node stmt a simple statement grecs node block a compound block statement The print section function prints a
51. tions and input file or files used e Conditions under which the bug appears Any errors typos or omissions found in this manual also qualify as bugs Please report them if you happen to find any Appendix A GNU Free Documentation License Appendix A GNU Free Documentation 39 License Version 1 2 November 2002 Copyright c 2000 2001 2002 Free Software Foundation Inc 59 Temple Place Suite 330 Boston MA 02111 1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document but changing it is not allowed PREAMBLE The purpose of this License is to make a manual textbook or other functional and useful document free in the sense of freedom to assure everyone the effective freedom to copy and redistribute it with or with out modifying it either commercially or noncommercially Secondarily this License preserves for the author and publisher a way to get credit for their work while not being considered responsible for modifications made by others This License is a kind of copyleft which means that derivative works of the document must themselves be free in the same sense It com plements the GNU General Public License which is a copyleft license designed for free software We have designed this License in order to use it for manuals for free soft ware because free software needs free documentation a free program should come with manuals providing the same freedoms that
52. uotes a double quote is represented as and a back slash is represented as 6 Pathname components are separated by dots A pathname which begins with a component separator is called absolute pathname and identifies the statement with relation to the topmost level of hierarchy A pathname beginning with an identifier is called relative and identifies the statement in relation to the statement represented by that identifier Examples of absolute pathnames are database description acl global deny view external zone com type Examples of relative pathnames are description zone com type 3 3 Example Configuration The following configuration file will assist us in further discussion Its syntax is fairly straightforward A simple statement is written as identifier followed value The two parts are separated by any amount of whitespace Simple statements are termi nated by semicolon A compound statement is written as identifier followed by a list of sub ordinate statements in curly braces A tag if present is put between the identifier and the opening curly brace These syntax conventions roughly correspond to the Grecs configuration format which cfpeek assumes by default see Section 4 1 grecs page 17 Chapter 3 Tutorial user smith group mail pidfile var run example logging 1 facility daemon tag example n program a 1 command a out facility localO
53. velopers CY debug lexer Trace configuration file lexer tay debug parser Trace configuration file parser Chapter 5 Cfpeek Command Line Syntax 29 5 7 Informational Options help h Print a concise usage summary and exit usage Print a summary of command line syntax and exit version ay Print the program version and exit Chapter 6 Exit Codes 31 6 Exit Codes When cfpeek terminates it reports the result of its invocation via its exit code Exit code of 0 indicates normal termination Exit code 1 indicates that not all search keys has been found Exit codes greater than 1 indicate various error conditions The exact cause of failure is reported on the standard error The exit codes are as follows Error parsing the input file 3 Script failure 64 The command was used incorrectly e g with the wrong number of arguments a bad option a bad syntax in a parameter or whatever 69 The requested script file does not exist contains syntax errors or cannot be parsed for whatever other reason TO An internal software error has occurred Please report it along with any error diagnostics produced by the program if you ever stumble upon this error code See Chapter 8 Reporting Bugs page 37 for detailed instructions 78 The script file parses correctly but does not define all the sym bols required by cfpeek Chapter 7 Scripting 33 7 Scripting This cha
54. y Section may not explain any mathematics The relationship could be a matter of historical connection with the subject or with related matters or of legal commercial philosophical ethical or political position regarding them The Invariant Sections are certain Secondary Sections whose titles are designated as being those of Invariant Sections in the notice that says that the Document is released under this License If a section does not fit the above definition of Secondary then it is not allowed to be designated as Invariant The Document may contain zero Invariant Sections If the Document does not identify any Invariant Sections then there are none The Cover Texts are certain short passages of text that are listed as Front Cover Texts or Back Cover Texts in the notice that says that the Document is released under this License A Front Cover Text may be at most 5 words and a Back Cover Text may be at most 25 words A Transparent copy of the Document means a machine readable copy represented in a format whose specification is available to the general public that is suitable for revising the document straightforwardly with generic text editors or for images composed of pixels generic paint pro grams or for drawings some widely available drawing editor and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters A copy made in an otherwi
Download Pdf Manuals
Related Search
Related Contents
1 - Sony Manuel d`utilisation Multimètre True RMS (mesures efficaces vraies Installationsanleitung Copyright © All rights reserved.
Failed to retrieve file