3 augmatch - inspect and match contents of configuration files
7 augmatch [OPTIONS] FILE
11 B<augmatch> prints the tree that Augeas generates by parsing a
12 configuration file, or only those parts of the tree that match a certain
13 path expression. Parsing is controlled by lenses, many of which ship with
14 Augeas. B<augmatch> to select the correct lens for a given file
15 automatically unless one is specified with the B<--lens> option.
23 Print all tree nodes, even ones without an associated value. Without this
24 flag, augmatch omits these nodes from the output as they are usually
27 =item B<-e>, B<--exact>
29 Only print the parts of the tree that exactly match the expression provided
30 with B<--match> and not any of the descendants of matching nodes.
32 =item B<-I>, B<--include>=I<DIR>
34 Add DIR to the module loadpath. Can be given multiple times. The
35 directories set here are searched before any directories specified in the
36 AUGEAS_LENS_LIB environment variable, and before the default directories
37 F</usr/share/augeas/lenses> and F</usr/share/augeas/lenses/dist>.
39 =item B<-l>, B<--lens>=I<LENS>
41 Use LENS for the given file; without this option, B<augmatch> tries to
42 guess the lens for the file based on the file's name and path which only
43 works for files in standard locations.
45 =item B<-L>, B<--print-lens>
47 Print the name of the lens that will be used with the given file and exit.
49 =item B<-m>, B<--match>=I<EXPR>
51 Only print the parts of the tree that match the path expression EXPR. All
52 nodes that match EXPR and their descendants will be printed. Use L<--exact>
53 to print only matching nodes but no descendants.
55 =item B<-r>, B<--root>=I<ROOT>
57 Use directory ROOT as the root of the filesystem. Takes precedence over a
58 root set with the AUGEAS_ROOT environment variable.
60 =item B<-S>, B<--nostdinc>
62 Do not search any of the default directories for lenses. When this option
63 is set, only directories specified explicitly with B<-I> or specified in
64 B<AUGEAS_LENS_LIB> will be searched for modules.
66 =item B<-o>, B<--only-value>
68 Print only the value and not the label or the path of nodes.
70 =item B<-q>, B<--quiet>
72 Do not print anything. Exit with zero status if a match was found
76 =head1 ENVIRONMENT VARIABLES
82 The file system root, defaults to '/'. Can be overridden with
83 the B<-r> command line option
85 =item B<AUGEAS_LENS_LIB>
87 Colon separated list of directories with lenses. Directories specified here
88 are searched after any directories set with the B<-I> command line option,
89 but before the default directories F</usr/share/augeas/lenses> and
90 F</usr/share/augeas/lenses/dist>
96 # print the tree for /etc/exports
99 # show only the entry for a specific mount
100 augmatch -m 'dir["/home"]' /etc/exports
102 # show all the clients to which we are exporting /home
103 augmatch -eom 'dir["/home"]/client' /etc/exports
107 The exit status is 0 when there was at least one match, 1 if there was no
108 match, and 2 if an error occurred.
112 Lenses and schema definitions in F</usr/share/augeas/lenses> and
113 F</usr/share/augeas/lenses/dist>
117 David Lutterkort <lutter@watzmann.net>
119 =head1 COPYRIGHT AND LICENSE
121 Copyright 2007-2018 David Lutterkort
123 Augeas (and augmatch) are distributed under the GNU Lesser General Public
128 B<Augeas> project homepage L<http://www.augeas.net/>
130 B<Augeas> path expressions L<https://github.com/hercules-team/augeas/wiki/Path-expressions>