fix minor typos in GNU-Linux-Tools-Summary.sgml

This commit is contained in:
Jason Leschnik 2016-10-24 23:38:47 +11:00
parent 2581f84edc
commit a7a3ed1d5e
1 changed files with 6 additions and 6 deletions

View File

@ -258,7 +258,7 @@ If you wish to make contributions it is recommended (if possible) to read the Ly
<chapter id="Legal"><title>Legal</title><para>The legal <indexterm><primary>legal</primary></indexterm>chapter provides information <indexterm><primary>information</primary></indexterm>about the disclaimer <indexterm><primary>disclaimer</primary></indexterm>that applies to the entire document and the licensing <indexterm><primary>licensing</primary></indexterm>information.</para><sect1 id="disclaimer"><title>Disclaimer</title><para>No liability <indexterm><primary>liability</primary></indexterm>for the contents <indexterm><primary>contents</primary></indexterm>of this document <indexterm><primary>documents</primary></indexterm>can be accepted. Use the concepts,<indexterm><primary>concepts</primary></indexterm> examples <indexterm><primary>examples</primary></indexterm>and other content <indexterm><primary>content</primary></indexterm>at your own risk.<indexterm><primary>risk</primary></indexterm> There may be errors <indexterm><primary>errors</primary></indexterm>and inaccuracies,<indexterm><primary>inaccuracies</primary></indexterm> that may of course be damaging to your system. Although this is highly <indexterm><primary>highly</primary></indexterm>unlikely, you should proceed <indexterm><primary>proceed</primary></indexterm>with caution.<indexterm><primary>caution</primary></indexterm> The author <indexterm><primary>author</primary></indexterm>does not accept any responsibility <indexterm><primary>responsibility</primary></indexterm>for any damage <indexterm><primary>damage</primary></indexterm>incurred.</para><para>All copyrights <indexterm><primary>copyrights</primary></indexterm>are held by their respective owners<indexterm><primary>respective owners</primary></indexterm>, unless specifically<indexterm><primary>specifically</primary></indexterm> noted otherwise. Use of a term <indexterm><primary>term</primary></indexterm>in this document should not be regarded <indexterm><primary>regarded</primary></indexterm>as affecting the validity <indexterm><primary>validity</primary></indexterm>of any trademark <indexterm><primary>trademark</primary></indexterm>or service mark<indexterm><primary>service mark</primary></indexterm>.</para><para>Naming <indexterm><primary>Naming</primary></indexterm>of particular products <indexterm><primary>products</primary></indexterm>or brands <indexterm><primary>brands</primary></indexterm>should not be seen as endorsements.<indexterm><primary>endorsements</primary></indexterm></para><para>UNIX <indexterm><primary>UNIX</primary></indexterm>is a registered trademark <indexterm><primary>trademark</primary></indexterm>of The Open Group<indexterm><primary>The Open Group</primary></indexterm>.</para></sect1>
<sect1 id="license"><title>License</title><para>Copyright <indexterm><primary>Copyright</primary></indexterm>&copy; 2003 - 2006 Gareth Anderson.<indexterm><primary>Gareth Anderson</primary></indexterm> Permission <indexterm><primary>Permission</primary></indexterm>is granted <indexterm><primary>granted</primary></indexterm>to copy,<indexterm><primary>copy</primary></indexterm> distribute <indexterm><primary>distribute</primary></indexterm>and/or modify <indexterm><primary>modify</primary></indexterm>this document under the terms <indexterm><primary>terms</primary></indexterm>of the <acronym>GNU</acronym> <indexterm><primary>GNU</primary></indexterm>Free Documentation License,<indexterm><primary>GNU Free Documentation License</primary></indexterm><indexterm><primary>GFDL</primary></indexterm> Version <indexterm><primary>Version</primary></indexterm>1.1 or any later version <indexterm><primary>version</primary></indexterm>published by the Free Software Foundation;<indexterm><primary>FSF</primary></indexterm><indexterm><primary>Free Software Foundation</primary></indexterm> with no Invariant <indexterm><primary>Invariant</primary></indexterm>Sections,<indexterm><primary>Sections</primary></indexterm> with no Front-Cover <indexterm><primary>Front-Cover</primary></indexterm>Texts, and with no Back-Cover <indexterm><primary>Back-Cover</primary></indexterm>Texts.<indexterm><primary>Texts</primary></indexterm> A copy of the license <indexterm><primary>license</primary></indexterm>can be found in the section called the <acronym>GNU</acronym> Free Documentation License or at the <ulink url="http://www.gnu.org/licenses/licenses.html">GNU Documentation License Site</ulink>.<indexterm><primary>GNU Documentation License Site</primary></indexterm></para></sect1>
</chapter>
<chapter id="The-UNIX-Tools-Philosophy"><title>The Unix Tools Philosophy</title><para>A tool is a simple program,<indexterm><primary>program</primary></indexterm> usually designed for a specific purpose, it is sometimes referred <indexterm><primary>referred</primary></indexterm>to (at least throughout this document) as a command.</para><para>The &ldquo; Unix tools philosophy&rdquo;<indexterm><primary>Unix Tools Philosophy</primary></indexterm> emerged <indexterm><primary>emerged</primary></indexterm>during the creation of the <productname>UNIX</productname> <indexterm><primary>UNIX</primary></indexterm>operating system, after the breakthrough invention <indexterm><primary>invention</primary></indexterm>of the pipe <indexterm><primary>pipe</primary></indexterm>'|' (refer to <xref linkend="Directing-input-ouput"> for information on using the pipe).</para><para>The pipe <indexterm><primary>pipe</primary></indexterm>allowed the output <indexterm><primary>output</primary></indexterm>of one program to be sent to the input <indexterm><primary>input</primary></indexterm>of another. The tools philosophy was to have small programs to accomplish a particular task instead of trying to develop large monolithic programs to do a large number of tasks. To accomplish more complex <indexterm><primary>complex</primary></indexterm>tasks,<indexterm><primary>tasks</primary></indexterm> tools would simply be connected <indexterm><primary>connected</primary></indexterm>together, using pipes.<indexterm><primary>pipes</primary></indexterm></para><para>All the core <indexterm><primary>core</primary></indexterm>UNIX system <indexterm><primary>UNIX system</primary></indexterm>tools were designed <indexterm><primary>designed</primary></indexterm>so that they could operate<indexterm><primary>operate</primary></indexterm> together. The original text-based <indexterm><primary>text-based</primary></indexterm>editors (and even <application>TeX</application> <indexterm><primary>TeX</primary></indexterm>and LaTeX<indexterm><primary>LaTeX</primary></indexterm>) use <acronym>ASCII</acronym> <indexterm><primary>ASCII</primary></indexterm>(the American text encoding standard;<indexterm><primary>American text encoding standard</primary></indexterm> an open standard) and you can use tools such as; <emphasis>sed</emphasis>, <emphasis>awk</emphasis>, <emphasis>vi</emphasis>, <emphasis>grep</emphasis>, <emphasis>cat</emphasis>, <emphasis>more</emphasis>, <emphasis>tr</emphasis> and various other text-based <indexterm><primary>text-based</primary></indexterm>tools in conjunction <indexterm><primary>conjunction</primary></indexterm>with these editors.<indexterm><primary>editors</primary></indexterm> </para><para>Using this philosophy <indexterm><primary>philosophy</primary></indexterm>programmers <indexterm><primary>programmers</primary></indexterm>avoided writing <indexterm><primary>writing</primary></indexterm>a program (within their larger program) that had already been written by someone else (this could be considered a form of code <indexterm><primary>code</primary></indexterm>recycling). For example, command-line<indexterm><primary>command-line</primary></indexterm> spell <indexterm><primary>spell</primary></indexterm>checkers are used by a number of different applications instead of having each application <indexterm><primary>application</primary></indexterm>create its own own spell checker.<indexterm><primary>checker</primary></indexterm></para><para>This philosophy <indexterm><primary>philosophy</primary></indexterm>lives on today <indexterm><primary>today</primary></indexterm>in GNU/Linux and various other <productname>UNIX</productname> system-based operating systems (FreeBSD,<indexterm><primary>FreeBSD</primary></indexterm> NetBSD,<indexterm><primary>NetBSD</primary></indexterm> OpenBSD,<indexterm><primary>OpenBSD</primary></indexterm> etc.).</para><para>For further information (articles) on the <productname>UNIX</productname> tools philosophy <indexterm><primary>UNIX tools philosophy</primary></indexterm>please see the further reading <indexterm><primary>further reading</primary></indexterm>section, here: <xref linkend="unix-tools-further-reading"></para><para></para></chapter>
<chapter id="The-UNIX-Tools-Philosophy"><title>The Unix Tools Philosophy</title><para>A tool is a simple program,<indexterm><primary>program</primary></indexterm> usually designed for a specific purpose, it is sometimes referred <indexterm><primary>referred</primary></indexterm>to (at least throughout this document) as a command.</para><para>The &ldquo; Unix tools philosophy&rdquo;<indexterm><primary>Unix Tools Philosophy</primary></indexterm> emerged <indexterm><primary>emerged</primary></indexterm>during the creation of the <productname>UNIX</productname> <indexterm><primary>UNIX</primary></indexterm>operating system, after the breakthrough invention <indexterm><primary>invention</primary></indexterm>of the pipe <indexterm><primary>pipe</primary></indexterm>'|' (refer to <xref linkend="Directing-input-ouput"> for information on using the pipe).</para><para>The pipe <indexterm><primary>pipe</primary></indexterm>allowed the output <indexterm><primary>output</primary></indexterm>of one program to be sent to the input <indexterm><primary>input</primary></indexterm>of another. The tools philosophy was to have small programs to accomplish a particular task instead of trying to develop large monolithic programs to do a large number of tasks. To accomplish more complex <indexterm><primary>complex</primary></indexterm>tasks,<indexterm><primary>tasks</primary></indexterm> tools would simply be connected <indexterm><primary>connected</primary></indexterm>together, using pipes.<indexterm><primary>pipes</primary></indexterm></para><para>All the core <indexterm><primary>core</primary></indexterm>UNIX system <indexterm><primary>UNIX system</primary></indexterm>tools were designed <indexterm><primary>designed</primary></indexterm>so that they could operate<indexterm><primary>operate</primary></indexterm> together. The original text-based <indexterm><primary>text-based</primary></indexterm>editors (and even <application>TeX</application> <indexterm><primary>TeX</primary></indexterm>and LaTeX<indexterm><primary>LaTeX</primary></indexterm>) use <acronym>ASCII</acronym> <indexterm><primary>ASCII</primary></indexterm>(the American text encoding standard;<indexterm><primary>American text encoding standard</primary></indexterm> an open standard) and you can use tools such as; <emphasis>sed</emphasis>, <emphasis>awk</emphasis>, <emphasis>vi</emphasis>, <emphasis>grep</emphasis>, <emphasis>cat</emphasis>, <emphasis>more</emphasis>, <emphasis>tr</emphasis> and various other text-based <indexterm><primary>text-based</primary></indexterm>tools in conjunction <indexterm><primary>conjunction</primary></indexterm>with these editors.<indexterm><primary>editors</primary></indexterm> </para><para>Using this philosophy <indexterm><primary>philosophy</primary></indexterm>programmers <indexterm><primary>programmers</primary></indexterm>avoided writing <indexterm><primary>writing</primary></indexterm>a program (within their larger program) that had already been written by someone else (this could be considered a form of code <indexterm><primary>code</primary></indexterm>recycling). For example, command-line<indexterm><primary>command-line</primary></indexterm> spell <indexterm><primary>spell</primary></indexterm>checkers are used by a number of different applications instead of having each application <indexterm><primary>application</primary></indexterm>create its own spell checker.<indexterm><primary>checker</primary></indexterm></para><para>This philosophy <indexterm><primary>philosophy</primary></indexterm>lives on today <indexterm><primary>today</primary></indexterm>in GNU/Linux and various other <productname>UNIX</productname> system-based operating systems (FreeBSD,<indexterm><primary>FreeBSD</primary></indexterm> NetBSD,<indexterm><primary>NetBSD</primary></indexterm> OpenBSD,<indexterm><primary>OpenBSD</primary></indexterm> etc.).</para><para>For further information (articles) on the <productname>UNIX</productname> tools philosophy <indexterm><primary>UNIX tools philosophy</primary></indexterm>please see the further reading <indexterm><primary>further reading</primary></indexterm>section, here: <xref linkend="unix-tools-further-reading"></para><para></para></chapter>
<chapter id="Shell-Tips"><title>Shell Tips</title><para>The shell <indexterm><primary>shell</primary></indexterm>tips chapter provides handy tricks that you may wish to use when you are using a GNU/Linux shell (the command-line<indexterm><primary>command-line</primary></indexterm> interface). This information includes handy <indexterm><primary>handy</primary></indexterm>shortcut <indexterm><primary>shortcut</primary></indexterm>key combinations,<indexterm><primary>key combinations</primary></indexterm> the shell's command history<indexterm><primary>command history</primary></indexterm> and information on virtual terminals.<indexterm><primary>virtual terminals</primary></indexterm></para><tip>
<title>If you can't boot into your system</title>
<para>If your having problems booting into your system you may like to use a shell so you can boot into your system and attempt to fix things up again.</para>
@ -380,7 +380,7 @@ Using <emphasis>echo</emphasis> allows you to expand the wildcards to understand
<sect1 id="the-command-line-history"><title>The command-line history</title><variablelist><varlistentry><term>Using&nbsp;the&nbsp;command&nbsp;history
</term><listitem><para><indexterm><primary>command history</primary></indexterm>Use the up and down key's to scroll <indexterm><primary>scroll</primary></indexterm>through previously typed commands. Press [Enter] to execute <indexterm><primary>execute</primary></indexterm>them or use the left and right arrow <indexterm><primary>arrow</primary></indexterm>keys to edit<indexterm><primary>edit</primary></indexterm> the command first. Also see <emphasis>history</emphasis> (below).</para></listitem></varlistentry><varlistentry><term>The&nbsp;history&nbsp;command
</term><listitem><para>The<emphasis> history <indexterm><primary>history</primary></indexterm></emphasis> command can be used to list Bash's log <indexterm><primary>log</primary></indexterm>of the commands you have typed:</para><para>This log <indexterm><primary>log</primary></indexterm>is called the &ldquo;history&rdquo;. To access <indexterm><primary>access</primary></indexterm>it type:</para><screen><![CDATA[history n
]]></screen><para>This will only list the last <indexterm><primary>last</primary></indexterm><emphasis>n</emphasis> commands. Type &ldquo;history&rdquo; (without options) to see the the entire history <indexterm><primary>history</primary></indexterm>list.<indexterm><primary>list</primary></indexterm></para><para>You can also type <emphasis>!n</emphasis><indexterm><primary>!n</primary></indexterm> to execute command number<indexterm><primary>command number</primary></indexterm> n. Use <emphasis>!!<indexterm><primary>!!</primary></indexterm></emphasis> to execute the last command you typed.</para><para><emphasis>!-n<indexterm><primary>!-n</primary></indexterm> </emphasis>will execute the command n times <indexterm><primary>times</primary></indexterm>before (in other words <emphasis>!-1</emphasis> is equivalent <indexterm><primary>equivalent</primary></indexterm>to <emphasis>!!</emphasis>). </para><para><emphasis>!string<indexterm><primary>!string</primary></indexterm> </emphasis>will execute the last command starting <indexterm><primary>starting</primary></indexterm>with that &ldquo;string&rdquo; and <emphasis>!?string?</emphasis> will execute the last command containing the word &ldquo;string&rdquo;. For example:</para><screen><![CDATA[!cd
]]></screen><para>This will only list the last <indexterm><primary>last</primary></indexterm><emphasis>n</emphasis> commands. Type &ldquo;history&rdquo; (without options) to see the entire history <indexterm><primary>history</primary></indexterm>list.<indexterm><primary>list</primary></indexterm></para><para>You can also type <emphasis>!n</emphasis><indexterm><primary>!n</primary></indexterm> to execute command number<indexterm><primary>command number</primary></indexterm> n. Use <emphasis>!!<indexterm><primary>!!</primary></indexterm></emphasis> to execute the last command you typed.</para><para><emphasis>!-n<indexterm><primary>!-n</primary></indexterm> </emphasis>will execute the command n times <indexterm><primary>times</primary></indexterm>before (in other words <emphasis>!-1</emphasis> is equivalent <indexterm><primary>equivalent</primary></indexterm>to <emphasis>!!</emphasis>). </para><para><emphasis>!string<indexterm><primary>!string</primary></indexterm> </emphasis>will execute the last command starting <indexterm><primary>starting</primary></indexterm>with that &ldquo;string&rdquo; and <emphasis>!?string?</emphasis> will execute the last command containing the word &ldquo;string&rdquo;. For example:</para><screen><![CDATA[!cd
]]></screen><para>Will re-run the command that you last typed starting with &ldquo;cd&rdquo;.</para><para></para><para><emphasis>&ldquo; commandName <indexterm><primary>commandName</primary></indexterm>!*&rdquo;</emphasis> will execute the &ldquo;commandName&rdquo; with any arguments <indexterm><primary>arguments</primary></indexterm>you used on your last command. This maybe useful if you make a spelling <indexterm><primary>spelling</primary></indexterm>mistake, for example. If you typed:</para><screen><![CDATA[emasc /home/fred/mywork.java /tmp/testme.java
]]></screen><para>In an attempt <indexterm><primary>attempt</primary></indexterm>to execute emacs <indexterm><primary>emacs</primary></indexterm>on the above two files this will obviously fail.<indexterm><primary>fail</primary></indexterm> So what you can do is type:</para><screen><![CDATA[emacs !*
]]></screen><para>This will execute emacs <indexterm><primary>emacs</primary></indexterm>with the arguments <indexterm><primary>arguments</primary></indexterm>that you last typed on the command-line.<indexterm><primary>command-line</primary></indexterm> In other words this is equivalent <indexterm><primary>equivalent</primary></indexterm>to typing:</para><screen><![CDATA[emacs /home/fred/mywork.java /tmp/testme.java
@ -1237,7 +1237,7 @@ You could also change the command it runs for example if you changed the <emphas
</term><listitem><para>Displays text, one page full at a time,<indexterm><primary>time</primary></indexterm> more limited than <emphasis>less</emphasis>. In this case <emphasis>less</emphasis> is better than <emphasis>more</emphasis>.</para><screen><![CDATA[more filename.txt
]]></screen><para>Or using a tool (is this example cat):</para><screen><![CDATA[cat file.txt | more
]]></screen></listitem></varlistentry><varlistentry><term>cat<anchor id="cat">
</term><listitem><para>Combines <indexterm><primary>Combines</primary></indexterm>(concatenates) multiple <indexterm><primary>multiple</primary></indexterm>documents <indexterm><primary>documents</primary></indexterm>into one document.<indexterm><primary>document</primary></indexterm> Can be used on individual <indexterm><primary>individual</primary></indexterm>files as well.</para><para>Some useful options:<indexterm><primary>options</primary></indexterm></para><itemizedlist><listitem><para><emphasis>-b</emphasis><indexterm><primary>-b</primary></indexterm> --- number <indexterm><primary>number</primary></indexterm>all non-blank <indexterm><primary>non-blank</primary></indexterm>lines</para></listitem><listitem><para><emphasis>-n<indexterm><primary>-n</primary></indexterm></emphasis> --- number all lines. </para></listitem></itemizedlist><para>Also try using <emphasis>nl</emphasis> to number lines (it can do more complex <indexterm><primary>complex</primary></indexterm>numbering), you will find it under under this section,<indexterm><primary>section</primary></indexterm> <xref linkend="text-manipulation-tools"></para><para>Example:</para><screen><![CDATA[cat filepart1 filepart2 filepart3 > wholefile.txt
</term><listitem><para>Combines <indexterm><primary>Combines</primary></indexterm>(concatenates) multiple <indexterm><primary>multiple</primary></indexterm>documents <indexterm><primary>documents</primary></indexterm>into one document.<indexterm><primary>document</primary></indexterm> Can be used on individual <indexterm><primary>individual</primary></indexterm>files as well.</para><para>Some useful options:<indexterm><primary>options</primary></indexterm></para><itemizedlist><listitem><para><emphasis>-b</emphasis><indexterm><primary>-b</primary></indexterm> --- number <indexterm><primary>number</primary></indexterm>all non-blank <indexterm><primary>non-blank</primary></indexterm>lines</para></listitem><listitem><para><emphasis>-n<indexterm><primary>-n</primary></indexterm></emphasis> --- number all lines. </para></listitem></itemizedlist><para>Also try using <emphasis>nl</emphasis> to number lines (it can do more complex <indexterm><primary>complex</primary></indexterm>numbering), you will find it under this section,<indexterm><primary>section</primary></indexterm> <xref linkend="text-manipulation-tools"></para><para>Example:</para><screen><![CDATA[cat filepart1 filepart2 filepart3 > wholefile.txt
]]></screen><para>This will combine <indexterm><primary>combine</primary></indexterm>(concatenate) filepart1,<indexterm><primary>filepart1</primary></indexterm> filepart2 <indexterm><primary>filepart2</primary></indexterm>and filepart3 <indexterm><primary>filepart3</primary></indexterm>into the single file &ldquo;wholefile.txt&rdquo;.</para></listitem></varlistentry><varlistentry><term>tac
</term><listitem><para><indexterm><primary>tac</primary></indexterm>Combines (concatenates) multiple <indexterm><primary>multiple</primary></indexterm>documents <indexterm><primary>documents</primary></indexterm>into one document <indexterm><primary>document</primary></indexterm>and outputs<indexterm><primary>outputs</primary></indexterm> them in reverse order.<indexterm><primary>reverse</primary></indexterm> Can also be used on individual <indexterm><primary>individual</primary></indexterm>files. Notice that <emphasis>tac</emphasis> is <emphasis>cat</emphasis> written backwards. </para><para>Example:</para><screen><![CDATA[tac filepart1 filepart2 filepart3 > wholefile.txt
]]></screen><para>This will combine <indexterm><primary>combine</primary></indexterm>(concatenate) filepart1,<indexterm><primary>filepart1</primary></indexterm> filepart2 <indexterm><primary>filepart2</primary></indexterm>and filepart3 <indexterm><primary>filepart3</primary></indexterm>into the single file but have each of the files written in reverse.<indexterm><primary>reverse</primary></indexterm></para></listitem></varlistentry><varlistentry><term>z*&nbsp;commands
@ -1283,8 +1283,8 @@ You could also change the command it runs for example if you changed the <emphas
]]></screen><para>This will run <emphasis>aspell</emphasis> on a particular file called &ldquo;FILE.txt&rdquo;, <emphasis>aspell</emphasis> will run interactively and prompt <indexterm><primary>prompt</primary></indexterm>for user input.</para><para><emphasis>ispell</emphasis> example:</para><screen><![CDATA[ispell FILE.txt
]]></screen><para>This will run <emphasis>ispell</emphasis> on a particular file called &ldquo;FILE.txt&rdquo; <emphasis>ispell</emphasis> will run interactively and prompt <indexterm><primary>prompt</primary></indexterm>for user input.</para></listitem></varlistentry><varlistentry><term>chcase
</term><listitem><para><indexterm><primary>chcase</primary></indexterm>Is used to change the uppercase <indexterm><primary>uppercase</primary></indexterm>letters in a file name to lowercase<indexterm><primary>lowercase</primary></indexterm> (or vice versa).</para><para>You could also use <emphasis>tr<indexterm><primary>tr</primary></indexterm></emphasis> to do the same thing... </para><screen><![CDATA[cat fileName.txt | tr '[A-Z]' '[a-z]' > newFileName.txt
]]></screen><para>The above would convert <indexterm><primary>convert</primary></indexterm>uppercase to lowercase using the the file &ldquo;fileName.txt&rdquo; as input <indexterm><primary>input</primary></indexterm>and outputting the results <indexterm><primary>results</primary></indexterm>to &ldquo;newFileName.txt&rdquo;.</para><screen><![CDATA[cat fileName.txt | tr '[a-z]' '[A-Z]' > newFileName.txt
]]></screen><para>The above would convert lowercase to uppercase using the the file &ldquo;fileName.txt&rdquo; as input <indexterm><primary>input</primary></indexterm>and outputting the results <indexterm><primary>results</primary></indexterm>to &ldquo;newFileName.txt&rdquo;.</para><para><emphasis>chcase</emphasis> (a perl <indexterm><primary>perl</primary></indexterm>script) can be found <indexterm><primary>found</primary></indexterm>at the <ulink url="http://www.blemished.net/chcase.html">chcase homepage.</ulink><indexterm><primary>chcase homepage</primary></indexterm></para><para></para></listitem></varlistentry><varlistentry><term>fmt
]]></screen><para>The above would convert <indexterm><primary>convert</primary></indexterm>uppercase to lowercase using the file &ldquo;fileName.txt&rdquo; as input <indexterm><primary>input</primary></indexterm>and outputting the results <indexterm><primary>results</primary></indexterm>to &ldquo;newFileName.txt&rdquo;.</para><screen><![CDATA[cat fileName.txt | tr '[a-z]' '[A-Z]' > newFileName.txt
]]></screen><para>The above would convert lowercase to uppercase using the file &ldquo;fileName.txt&rdquo; as input <indexterm><primary>input</primary></indexterm>and outputting the results <indexterm><primary>results</primary></indexterm>to &ldquo;newFileName.txt&rdquo;.</para><para><emphasis>chcase</emphasis> (a perl <indexterm><primary>perl</primary></indexterm>script) can be found <indexterm><primary>found</primary></indexterm>at the <ulink url="http://www.blemished.net/chcase.html">chcase homepage.</ulink><indexterm><primary>chcase homepage</primary></indexterm></para><para></para></listitem></varlistentry><varlistentry><term>fmt
</term><listitem><para><indexterm><primary>fmt</primary></indexterm>(format) a simple text formatter. Use<emphasis> fmt <indexterm><primary>fmt</primary></indexterm></emphasis>with the <emphasis>-u<indexterm><primary>-u</primary></indexterm></emphasis> option to output text with &quot;uniform spacing&quot;, where the space <indexterm><primary>space</primary></indexterm>between words is reduced to one space character <indexterm><primary>character</primary></indexterm>and the space between sentences <indexterm><primary>sentences</primary></indexterm>is reduced to two space characters. </para><para>Example:</para><screen><![CDATA[fmt -u myessay.txt
]]></screen><para>Will make sure the amount <indexterm><primary>amount</primary></indexterm>of space between sentences <indexterm><primary>sentences</primary></indexterm>is two spaces and the amount <indexterm><primary>amount</primary></indexterm>of space between words is one space.</para></listitem></varlistentry><varlistentry><term>paste
</term><listitem><para><indexterm><primary>paste</primary></indexterm>Puts lines from two files together, either lines of each file side by side (normally separated <indexterm><primary>separated</primary></indexterm>by a tab-stop <indexterm><primary>tab-stop</primary></indexterm>but you can have any symbols(s) you like...) or it can have words from each file (the first file then the second file) side by side.</para><para>To obtain a list <indexterm><primary>list</primary></indexterm>of lines side by side, the first lines from the first file on the left side separated <indexterm><primary>separated</primary></indexterm>by a tab-stop <indexterm><primary>tab-stop</primary></indexterm>then the first lines from the second file. You would type:</para><screen><![CDATA[paste file1.txt file2.txt
@ -1721,7 +1721,7 @@ Note that with mtools commands you can use the slashes on the a: part either way
]]></screen><para>This would run the echo <indexterm><primary>echo</primary></indexterm>command with the string <indexterm><primary>string</primary></indexterm>shown at 4:05 every Sunday.</para></listitem></varlistentry></variablelist><para></para></chapter>
<chapter id="Miscellaneous"><title>Miscellaneous</title><para>The miscellaneous <indexterm><primary>miscellaneous</primary></indexterm>chapter contains commands that don't really fit into the other sections <indexterm><primary>sections</primary></indexterm>of this guide.</para><variablelist><varlistentry><term>renaming&nbsp;extensions
</term><listitem><para><indexterm><primary>renaming extensions</primary></indexterm>To rename <indexterm><primary>rename</primary></indexterm>all of the files in the current <indexterm><primary>current</primary></indexterm>directory<indexterm><primary>directory</primary></indexterm> with a '.htm' extension <indexterm><primary>extension</primary></indexterm>to '.html', type:</para><screen><![CDATA[$ chcase -x 's/htm/html/' '*.htm']]><indexterm><primary>-x</primary></indexterm><![CDATA[
]]></screen><para>You can get a copy <indexterm><primary>copy</primary></indexterm>of <emphasis>the chcase <indexterm><primary>chcase</primary></indexterm></emphasis> perl <indexterm><primary>perl</primary></indexterm>script<emphasis> <ulink url="http://www.blemished.net/chcase.html">here.</ulink></emphasis></para><para>For more <indexterm><primary>more</primary></indexterm>complex <indexterm><primary>complex</primary></indexterm>renaming <indexterm><primary>renaming</primary></indexterm>you should read <xref linkend="mass-rename"></para></listitem></varlistentry><varlistentry><term>rel<footnote><para>This information information comes from the <productname>Linux</productname> Cookbook (without editing). See [3] in the <xref linkend="references"> for further information.</para></footnote>
]]></screen><para>You can get a copy <indexterm><primary>copy</primary></indexterm>of <emphasis>the chcase <indexterm><primary>chcase</primary></indexterm></emphasis> perl <indexterm><primary>perl</primary></indexterm>script<emphasis> <ulink url="http://www.blemished.net/chcase.html">here.</ulink></emphasis></para><para>For more <indexterm><primary>more</primary></indexterm>complex <indexterm><primary>complex</primary></indexterm>renaming <indexterm><primary>renaming</primary></indexterm>you should read <xref linkend="mass-rename"></para></listitem></varlistentry><varlistentry><term>rel<footnote><para>This information comes from the <productname>Linux</productname> Cookbook (without editing). See [3] in the <xref linkend="references"> for further information.</para></footnote>
</term><listitem><para>Use rel <indexterm><primary>rel</primary></indexterm>to analyze <indexterm><primary>analyze</primary></indexterm>text files for relevance <indexterm><primary>relevance</primary></indexterm>to a given set of keywords.<indexterm><primary>keywords</primary></indexterm> It outputs <indexterm><primary>outputs</primary></indexterm>the names of those files that are relevant <indexterm><primary>relevant</primary></indexterm>to the given keywords, ranked <indexterm><primary>ranked</primary></indexterm>in order <indexterm><primary>order</primary></indexterm>of relevance;<indexterm><primary>relevance</primary></indexterm> if a file does not meet the criteria,<indexterm><primary>criteria</primary></indexterm> it is not outputted in the relevance <indexterm><primary>relevance</primary></indexterm>listing.</para></listitem></varlistentry><varlistentry><term>units&nbsp;man&nbsp;page
</term><listitem><para><indexterm><primary>units man page</primary></indexterm>There is a man page, part of the <productname>Linux</productname> Programmers <indexterm><primary>Programmers</primary></indexterm>Manual called &ldquo;units&rdquo;. It displays various information <indexterm><primary>information</primary></indexterm>on the various scientific <indexterm><primary>scientific</primary></indexterm>measurements<indexterm><primary>measurements</primary></indexterm> (such as mega,<indexterm><primary>mega</primary></indexterm> giga <indexterm><primary>giga</primary></indexterm>et cetera). This manual <indexterm><primary>manual</primary></indexterm>page <indexterm><primary>page</primary></indexterm>also has a short discussion about the argument <indexterm><primary>argument</primary></indexterm>over which<indexterm><primary>which</primary></indexterm> standard <indexterm><primary>standard</primary></indexterm>should be used to measure <indexterm><primary>measure</primary></indexterm>data (ie. the kibibyte <indexterm><primary>kibibyte</primary></indexterm>vs kilobyte). </para><para>To access <indexterm><primary>access</primary></indexterm>this man page type:</para><screen><![CDATA[man 7 units
]]></screen></listitem></varlistentry><varlistentry><term>fortune