Permalink
Browse files

exploiring

  • Loading branch information...
1 parent 76ae71d commit 80b4a9d7e559fd2ee92e118d977389b54e2334e1 @raphink committed Jun 12, 2012
Showing with 6 additions and 5 deletions.
  1. +6 −5 en/chapters/exploring_augtool.tex
@@ -12,19 +12,20 @@ \chapter{Exploring augtool}
and yet others, look you, hereabout;\\
and each flock hath his several fold builded.}{Idyll 25.7}{Theocritus}
-Augeas is primarily a C library with bindings but it also provides a command-line tool called \verb!augtool!, which we will be using in the following examples. In chapter~\ref{chap:api}, we will see how to use the API and bindings directly.
+Augeas is primarily a C library with bindings but it also provides a command-line tool called \verb!augtool!, which we will be using in the following examples. In chapter~\ref{chap:api}, we will see how to use the C~API and bindings directly.
\section{Parsing your System Configuration Files}
-The first thing we might want to do is to see how Augeas sees your system configuration files. Fire up \verb!augtool!:
+The first thing you might want to do is to explore how Augeas sees your system configuration files. Fire up \verb!augtool!:
\consolecode/$ augtool/
This will give you an interactive shell which passes commands to Augeas.
To see which commands your version of \texttt{augtool} supports, simply type \texttt{help}:
+\nopagebreak
\begin{augtoolsh}[]
augtool> help
Commands:
@@ -44,10 +45,10 @@ \section{Parsing your System Configuration Files}
print - print a subtree
dump-xml - print a subtree as XML
rm - delete nodes and subtrees
- save - save all pending changes
- set - set the value of a node
\end{augtoolsh}
\begin{augtoolsh}[]
+ save - save all pending changes
+ set - set the value of a node
setm - set the value of multiple nodes
clearm - clear the value of multiple nodes
span - print position in input file corresponding to tree
@@ -125,7 +126,7 @@ \section{Parsing your System Configuration Files}
/files/etc/fstab/1/opt[3] = nosuid
\end{augtoolsh}
-Now, we might want to get the value of the single node matching an expression, and make sure that this node is unique. For example, if we want the value of the first \verb!opt! node of this first line, we could use the \verb!get! command:
+Now, you might want to get the value of the single node matching an expression, and make sure that this node is unique. For example, if we want the value of the first \verb!opt! node of this first line, we could use the \verb!get! command:
\begin{augtoolsh}[]
augtool> get /files/etc/fstab/1/opt[1]

0 comments on commit 80b4a9d

Please sign in to comment.