dded links to translations, corrected here doc in chap 9, clarified example in chap4

This commit is contained in:
tille 2006-03-15 08:50:24 +00:00
parent 43dc2599d8
commit f4e399e2c9
2 changed files with 5 additions and 5 deletions

View File

@ -93,7 +93,7 @@ apache:x:48:48:Apache:/var/www:/bin/false
<para>Then she displays the line numbers containing this search string.</para>
<para>With the third command she checks which users are not using <command>bash</command>, but accounts with the <command>nologin</command> shell are not displayed.</para>
<para>Then she counts the number of accounts that have <filename>/bin/false</filename> as the shell.</para>
<para>The last command displays the lines from all the files in her home directory starting with <filename>~/.bash</filename>, excluding matches containing history, so as to exclude matches from <filename>~/.bash_history</filename> which might contain the same string, in upper or lower cases.</para>
<para>The last command displays the lines from all the files in her home directory starting with <filename>~/.bash</filename>, excluding matches containing the string <emphasis>history</emphasis>, so as to exclude matches from <filename>~/.bash_history</filename> which might contain the same string, in upper or lower cases. Note that the search is for the <emphasis>string</emphasis> <quote>ps</quote>, and not for the <emphasis>command</emphasis> <command>ps</command>.</para>
<para>Now let's see what else we can do with grep, using regular expressions.</para>
</sect2>
<sect2 id="sect_04_02_02"><title>Grep and regular expressions</title>

View File

@ -525,7 +525,7 @@ done
</screen>
<note><title>-exec vs. xargs</title>
<para>The above <command>find</command> command can be replaced with the following:</para>
<cmdsynopsis><command>find <option>options</option> | xargs [commands_to_execute_on_found_files</command></cmdsynopsis>
<cmdsynopsis><command>find <option>options</option> | xargs [commands_to_execute_on_found_files]</command></cmdsynopsis>
<para>The <command>xargs</command> command builds and executes command lines from standard input. This has the advantage that the command line is filled until the system limit is reached. Only then will the command to execute be called, in the above example this would be <command>rm</command>. If there are more arguments, a new command line will be used, until that one is full or until there are no more arguments. The same thing using <command>find <option>-exec</option></command> calls on the command to execute on the found files every time a file is found. Thus, using <command>xargs</command> greatly speeds up your scripts and the performance of your machine.</para>
</note>
<para>In the next example, we modified the script from <xref linkend="sect_08_02_04_04" /> so that it accepts multiple packages to install at once:</para>
@ -537,9 +537,9 @@ if [ $# -lt 1 ]; then
fi
while (($#)); do
yum install $1 &lt;&lt; CONFIRM
y
CONFIRM
shift
y
CONFIRM
shift
done
</screen>
</sect2>