Started on final changes to the build scripts so that we can start with totally automatic builds
authoramit@thunder
Thu, 25 Feb 2010 00:04:27 +0530
changeset 27 cb14131583c6
parent 26 1846ab4ebdda
child 28 514098969b11
Started on final changes to the build scripts so that we can start with totally automatic builds
SEESenv/scripts/myrst2xml.py
SEESenv/web/html/ch1Introduction.html
SEESenv/web/html/ch2intro.html
SEESenv/web/html/ch3list_tuples.html
SEESenv/web/html/ch4strings_dicts.html
SEESenv/web/html/ch5func.html
SEESenv/web/html/ch6oop.html
SEESenv/web/html/ch7interim_assessment.html
SEESenv/web/html/ch8ult_module_plan.html
SEESenv/web/html/ch9Using_Linux_Tools.html
SEESenv/web/html/chn10session4.html
SEESenv/web/html/chn11Section_5.html
SEESenv/web/html/chn12index.html
--- a/SEESenv/scripts/myrst2xml.py	Tue Feb 23 19:56:48 2010 +0530
+++ b/SEESenv/scripts/myrst2xml.py	Thu Feb 25 00:04:27 2010 +0530
@@ -13,8 +13,9 @@
 import pkg_resources
 import time
 from docutils.core import publish_file 
+import os
 chapterno=0
-
+tmp_folder="/home/hg/repos/SEES-hacks/"
 
 
 
@@ -23,28 +24,20 @@
 
 
 
-def convert2xml(file):
-#    print folder,subfolder,file
-    file=file.split("\n")[0]
-    file= file.split("\t")[0]  
-    global chapterno
+def convert2xml(file_name):
+    """ convert to xml using rst2xml internally """
+    global chapterno    
+    file=file.split()[0]
     name=file.split('/')[-1]
     name='ch'+str(chapterno)+name.split('.')[0]
-#    full_file=os.path.join(folder,file)    
-#    if file.endswith('.rst'):    
+  
     print file	    
     xml_file=name+'.xml'        
     a=open(xml_file,'w')
-#    a.close()
-#    command="rst2xml.py %s > %s" %(file , xml_file)
-          
-#    a=subprocess.Popen(command , shell=True)
-#    time.sleep(10) 	   	
-#    a.kill()
     publish_file(source_path=file, destination_path=xml_file,parser_name='restructuredtext', writer_name='xml') 
 def walk(repo):
     global chapterno
-    mainfolder='/home/amit/sttp_latest/'    
+    mainfolder='/home/hg/repos/sttp/'    
     for readline in open('index.config','r').readlines():
         chapterno+=1		
         filename=mainfolder+readline
--- a/SEESenv/web/html/ch1Introduction.html	Tue Feb 23 19:56:48 2010 +0530
+++ b/SEESenv/web/html/ch1Introduction.html	Thu Feb 25 00:04:27 2010 +0530
@@ -27,7 +27,7 @@
     <dl>
      <dt>
       <span class="article">
-       <a href="#id2769890">
+       <a href="#id2442756">
         Introduction to the Course
        </a>
       </span>
@@ -39,7 +39,7 @@
      <div>
       <div>
        <h2 class="title">
-        <a name="id2769890">
+        <a name="id2442756">
         </a>
         Introduction to the Course
        </h2>
--- a/SEESenv/web/html/ch2intro.html	Tue Feb 23 19:56:48 2010 +0530
+++ b/SEESenv/web/html/ch2intro.html	Thu Feb 25 00:04:27 2010 +0530
@@ -27,7 +27,7 @@
     <dl>
      <dt>
       <span class="article">
-       <a href="#id2809348">
+       <a href="#id2766476">
         Basic Python
        </a>
       </span>
@@ -36,14 +36,14 @@
       <dl>
        <dt>
         <span class="section">
-         <a href="#id2617111">
+         <a href="#id2574240">
           1. Introduction
          </a>
         </span>
        </dt>
        <dt>
         <span class="section">
-         <a href="#id2860477">
+         <a href="#id2817606">
           2. The Python Interpreter
          </a>
         </span>
@@ -52,14 +52,14 @@
         <dl>
          <dt>
           <span class="section">
-           <a href="#id2860486">
+           <a href="#id2817615">
             2.1. The Interactive Interpreter
            </a>
           </span>
          </dt>
          <dt>
           <span class="section">
-           <a href="#id2860659">
+           <a href="#id2817788">
             2.2.
             <span class="emphasis">
              <em>
@@ -74,14 +74,14 @@
        </dd>
        <dt>
         <span class="section">
-         <a href="#id2860784">
+         <a href="#id2817912">
           3. Editing and running a python file
          </a>
         </span>
        </dt>
        <dt>
         <span class="section">
-         <a href="#id2860890">
+         <a href="#id2818019">
           4. Basic Datatypes and operators in Python
          </a>
         </span>
@@ -90,28 +90,28 @@
         <dl>
          <dt>
           <span class="section">
-           <a href="#id2860925">
+           <a href="#id2818053">
             4.1. Numbers
            </a>
           </span>
          </dt>
          <dt>
           <span class="section">
-           <a href="#id2861055">
+           <a href="#id2818183">
             4.2. Variables
            </a>
           </span>
          </dt>
          <dt>
           <span class="section">
-           <a href="#id2861102">
+           <a href="#id2818231">
             4.3. Strings
            </a>
           </span>
          </dt>
          <dt>
           <span class="section">
-           <a href="#id2861297">
+           <a href="#id2818425">
             4.4. Boolean
            </a>
           </span>
@@ -120,7 +120,7 @@
        </dd>
        <dt>
         <span class="section">
-         <a href="#id2861325">
+         <a href="#id2818454">
           5. The
           <span class="strong">
            <strong>
@@ -133,7 +133,7 @@
        </dt>
        <dt>
         <span class="section">
-         <a href="#id2861363">
+         <a href="#id2818491">
           6. The
           <span class="strong">
            <strong>
@@ -146,7 +146,7 @@
        </dt>
        <dt>
         <span class="section">
-         <a href="#id2861432">
+         <a href="#id2818560">
           7.
           <span class="strong">
            <strong>
@@ -158,7 +158,7 @@
        </dt>
        <dt>
         <span class="section">
-         <a href="#id2861586">
+         <a href="#id2818715">
           8.
           <span class="strong">
            <strong>
@@ -178,7 +178,7 @@
      <div>
       <div>
        <h2 class="title">
-        <a name="id2809348">
+        <a name="id2766476">
         </a>
         Basic Python
        </h2>
@@ -195,14 +195,14 @@
      <dl>
       <dt>
        <span class="section">
-        <a href="#id2617111">
+        <a href="#id2574240">
          1. Introduction
         </a>
        </span>
       </dt>
       <dt>
        <span class="section">
-        <a href="#id2860477">
+        <a href="#id2817606">
          2. The Python Interpreter
         </a>
        </span>
@@ -211,14 +211,14 @@
        <dl>
         <dt>
          <span class="section">
-          <a href="#id2860486">
+          <a href="#id2817615">
            2.1. The Interactive Interpreter
           </a>
          </span>
         </dt>
         <dt>
          <span class="section">
-          <a href="#id2860659">
+          <a href="#id2817788">
            2.2.
            <span class="emphasis">
             <em>
@@ -233,14 +233,14 @@
       </dd>
       <dt>
        <span class="section">
-        <a href="#id2860784">
+        <a href="#id2817912">
          3. Editing and running a python file
         </a>
        </span>
       </dt>
       <dt>
        <span class="section">
-        <a href="#id2860890">
+        <a href="#id2818019">
          4. Basic Datatypes and operators in Python
         </a>
        </span>
@@ -249,28 +249,28 @@
        <dl>
         <dt>
          <span class="section">
-          <a href="#id2860925">
+          <a href="#id2818053">
            4.1. Numbers
           </a>
          </span>
         </dt>
         <dt>
          <span class="section">
-          <a href="#id2861055">
+          <a href="#id2818183">
            4.2. Variables
           </a>
          </span>
         </dt>
         <dt>
          <span class="section">
-          <a href="#id2861102">
+          <a href="#id2818231">
            4.3. Strings
           </a>
          </span>
         </dt>
         <dt>
          <span class="section">
-          <a href="#id2861297">
+          <a href="#id2818425">
            4.4. Boolean
           </a>
          </span>
@@ -279,7 +279,7 @@
       </dd>
       <dt>
        <span class="section">
-        <a href="#id2861325">
+        <a href="#id2818454">
          5. The
          <span class="strong">
           <strong>
@@ -292,7 +292,7 @@
       </dt>
       <dt>
        <span class="section">
-        <a href="#id2861363">
+        <a href="#id2818491">
          6. The
          <span class="strong">
           <strong>
@@ -305,7 +305,7 @@
       </dt>
       <dt>
        <span class="section">
-        <a href="#id2861432">
+        <a href="#id2818560">
          7.
          <span class="strong">
           <strong>
@@ -317,7 +317,7 @@
       </dt>
       <dt>
        <span class="section">
-        <a href="#id2861586">
+        <a href="#id2818715">
          8.
          <span class="strong">
           <strong>
@@ -360,7 +360,7 @@
       <div>
        <div>
         <h2 class="title" style="clear: both">
-         <a name="id2617111">
+         <a name="id2574240">
          </a>
          1.Introduction
         </h2>
@@ -544,7 +544,7 @@
       <div>
        <div>
         <h2 class="title" style="clear: both">
-         <a name="id2860477">
+         <a name="id2817606">
          </a>
          2.The Python Interpreter
         </h2>
@@ -556,7 +556,7 @@
        <div>
         <div>
          <h3 class="title">
-          <a name="id2860486">
+          <a name="id2817615">
           </a>
           2.1.The Interactive Interpreter
          </h3>
@@ -723,7 +723,7 @@
        <div>
         <div>
          <h3 class="title">
-          <a name="id2860659">
+          <a name="id2817788">
           </a>
           2.2.
           <span class="emphasis">
@@ -824,7 +824,7 @@
       <div>
        <div>
         <h2 class="title" style="clear: both">
-         <a name="id2860784">
+         <a name="id2817912">
          </a>
          3.Editing and running a python file
         </h2>
@@ -925,7 +925,7 @@
       <div>
        <div>
         <h2 class="title" style="clear: both">
-         <a name="id2860890">
+         <a name="id2818019">
          </a>
          4.Basic Datatypes and operators in Python
         </h2>
@@ -959,7 +959,7 @@
        <div>
         <div>
          <h3 class="title">
-          <a name="id2860925">
+          <a name="id2818053">
           </a>
           4.1.Numbers
          </h3>
@@ -1076,7 +1076,7 @@
        <div>
         <div>
          <h3 class="title">
-          <a name="id2861055">
+          <a name="id2818183">
           </a>
           4.2.Variables
          </h3>
@@ -1121,7 +1121,7 @@
        <div>
         <div>
          <h3 class="title">
-          <a name="id2861102">
+          <a name="id2818231">
           </a>
           4.3.Strings
          </h3>
@@ -1174,7 +1174,7 @@
         <div>
          <div>
           <h4 class="title">
-           <a name="id2861154">
+           <a name="id2818283">
            </a>
            4.3.1.String operations
           </h4>
@@ -1313,7 +1313,7 @@
        <div>
         <div>
          <h3 class="title">
-          <a name="id2861297">
+          <a name="id2818425">
           </a>
           4.4.Boolean
          </h3>
@@ -1356,7 +1356,7 @@
       <div>
        <div>
         <h2 class="title" style="clear: both">
-         <a name="id2861325">
+         <a name="id2818454">
          </a>
          5.The
          <span class="strong">
@@ -1407,7 +1407,7 @@
       <div>
        <div>
         <h2 class="title" style="clear: both">
-         <a name="id2861363">
+         <a name="id2818491">
          </a>
          6.The
          <span class="strong">
@@ -1484,7 +1484,7 @@
       <div>
        <div>
         <h2 class="title" style="clear: both">
-         <a name="id2861432">
+         <a name="id2818560">
          </a>
          7.
          <span class="strong">
@@ -1634,7 +1634,7 @@
       <div>
        <div>
         <h2 class="title" style="clear: both">
-         <a name="id2861586">
+         <a name="id2818715">
          </a>
          8.
          <span class="strong">
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SEESenv/web/html/ch3list_tuples.html	Thu Feb 25 00:04:27 2010 +0530
@@ -0,0 +1,1734 @@
+<html>
+ <head>
+  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+  <title>
+   Chapter. list_tuples
+  </title>
+  <link rel="stylesheet" href="/review/support/styles.css" type="text/css" />
+  <meta name="generator" content="DocBook XSL Stylesheets V1.74.3" />
+  <link rel="shortcut icon" type="image/png" href="/review/support/figs/favicon.png" />
+  <script type="text/javascript" src="/review/support/jquery-min.js">
+  </script>
+  <script type="text/javascript" src="/review/support/form.js">
+  </script>
+  <script type="text/javascript" src="/review/support/hsbook.js">
+  </script>
+ </head>
+ <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+  <div class="chapter" id="ch3list_tuples">
+   <div class="titlepage">
+   </div>
+   <div class="toc">
+    <p>
+     <b>
+      Table of Contents
+     </b>
+    </p>
+    <dl>
+     <dt>
+      <span class="article">
+       <a href="#id2951820">
+        Lists and Tuples
+       </a>
+      </span>
+     </dt>
+     <dd>
+      <dl>
+       <dt>
+        <span class="section">
+         <a href="#id2761866">
+          1. Lists
+         </a>
+        </span>
+       </dt>
+       <dd>
+        <dl>
+         <dt>
+          <span class="section">
+           <a href="#id2951624">
+            1.1. Common List Operations
+           </a>
+          </span>
+         </dt>
+         <dt>
+          <span class="section">
+           <a href="#id3003090">
+            1.2. None, Empty Lists, and Initialization
+           </a>
+          </span>
+         </dt>
+         <dt>
+          <span class="section">
+           <a href="#id3003130">
+            1.3. Nested Lists
+           </a>
+          </span>
+         </dt>
+         <dt>
+          <span class="section">
+           <a href="#id3003165">
+            1.4. List Methods
+           </a>
+          </span>
+         </dt>
+        </dl>
+       </dd>
+       <dt>
+        <span class="section">
+         <a href="#id3003481">
+          2. Tuples
+         </a>
+        </span>
+       </dt>
+       <dd>
+        <dl>
+         <dt>
+          <span class="section">
+           <a href="#id3003578">
+            2.1. Common Tuple Operations
+           </a>
+          </span>
+         </dt>
+        </dl>
+       </dd>
+       <dt>
+        <span class="section">
+         <a href="#id3003727">
+          3. Additional Syntax
+         </a>
+        </span>
+       </dt>
+       <dd>
+        <dl>
+         <dt>
+          <span class="section">
+           <a href="#id3003745">
+            3.1. range()
+           </a>
+          </span>
+         </dt>
+         <dt>
+          <span class="section">
+           <a href="#id3003777">
+            3.2. for
+           </a>
+          </span>
+         </dt>
+        </dl>
+       </dd>
+       <dt>
+        <span class="section">
+         <a href="#id3003836">
+          4. Conclusion
+         </a>
+        </span>
+       </dt>
+      </dl>
+     </dd>
+    </dl>
+   </div>
+   <div class="article" title="Lists and Tuples">
+    <div class="titlepage">
+     <div>
+      <div>
+       <h2 class="title">
+        <a name="id2951820">
+        </a>
+        Lists and Tuples
+       </h2>
+      </div>
+     </div>
+     <hr />
+    </div>
+    <div class="toc">
+     <p>
+      <b>
+       Table of Contents
+      </b>
+     </p>
+     <dl>
+      <dt>
+       <span class="section">
+        <a href="#id2761866">
+         1. Lists
+        </a>
+       </span>
+      </dt>
+      <dd>
+       <dl>
+        <dt>
+         <span class="section">
+          <a href="#id2951624">
+           1.1. Common List Operations
+          </a>
+         </span>
+        </dt>
+        <dt>
+         <span class="section">
+          <a href="#id3003090">
+           1.2. None, Empty Lists, and Initialization
+          </a>
+         </span>
+        </dt>
+        <dt>
+         <span class="section">
+          <a href="#id3003130">
+           1.3. Nested Lists
+          </a>
+         </span>
+        </dt>
+        <dt>
+         <span class="section">
+          <a href="#id3003165">
+           1.4. List Methods
+          </a>
+         </span>
+        </dt>
+       </dl>
+      </dd>
+      <dt>
+       <span class="section">
+        <a href="#id3003481">
+         2. Tuples
+        </a>
+       </span>
+      </dt>
+      <dd>
+       <dl>
+        <dt>
+         <span class="section">
+          <a href="#id3003578">
+           2.1. Common Tuple Operations
+          </a>
+         </span>
+        </dt>
+       </dl>
+      </dd>
+      <dt>
+       <span class="section">
+        <a href="#id3003727">
+         3. Additional Syntax
+        </a>
+       </span>
+      </dt>
+      <dd>
+       <dl>
+        <dt>
+         <span class="section">
+          <a href="#id3003745">
+           3.1. range()
+          </a>
+         </span>
+        </dt>
+        <dt>
+         <span class="section">
+          <a href="#id3003777">
+           3.2. for
+          </a>
+         </span>
+        </dt>
+       </dl>
+      </dd>
+      <dt>
+       <span class="section">
+        <a href="#id3003836">
+         4. Conclusion
+        </a>
+       </span>
+      </dt>
+     </dl>
+    </div>
+    <div class="section" title="1.Lists">
+     <div class="titlepage">
+      <div>
+       <div>
+        <h2 class="title" style="clear: both">
+         <a name="id2761866">
+         </a>
+         1.Lists
+        </h2>
+       </div>
+      </div>
+     </div>
+     <p id="ch3list_tuples_1">
+      Python provides an intuitive way to represent a group items, called
+      <span class="emphasis">
+       <em>
+        Lists
+       </em>
+      </span>
+      . The
+items of a
+      <span class="emphasis">
+       <em>
+        List
+       </em>
+      </span>
+      are called its elements. Unlike C/C++, elements can be of any
+type. A
+      <span class="emphasis">
+       <em>
+        List
+       </em>
+      </span>
+      is represented as a list of comma-sepated elements with square
+brackets around them:
+     </p>
+     <pre class="programlisting">
+      &gt;&gt;&gt; a = [10, 'Python programming', 20.3523, 23, 3534534L]
+&gt;&gt;&gt; a
+[10, 'Python programming', 20.3523, 23, 3534534L]
+     </pre>
+     <div class="section" title="1.1.Common List Operations">
+      <div class="titlepage">
+       <div>
+        <div>
+         <h3 class="title">
+          <a name="id2951624">
+          </a>
+          1.1.Common List Operations
+         </h3>
+        </div>
+       </div>
+      </div>
+      <p id="ch3list_tuples_2">
+       The following are some of the most commonly used operations on
+       <span class="emphasis">
+        <em>
+         Lists
+        </em>
+       </span>
+       .
+      </p>
+      <div class="section" title="1.1.1.Indexing">
+       <div class="titlepage">
+        <div>
+         <div>
+          <h4 class="title">
+           <a name="id2951669">
+           </a>
+           1.1.1.Indexing
+          </h4>
+         </div>
+        </div>
+       </div>
+       <p id="ch3list_tuples_3">
+        Individual elements of a
+        <span class="emphasis">
+         <em>
+          List
+         </em>
+        </span>
+        can be accessed using an index to the element.
+The indices start at 0. One can also access the elements of the
+        <span class="emphasis">
+         <em>
+          List
+         </em>
+        </span>
+        in reverse
+using negative indices.:
+       </p>
+       <pre class="programlisting">
+        &gt;&gt;&gt; a[1]
+'Python programming'
+&gt;&gt;&gt; a[-1]
+3534534L
+       </pre>
+       <p id="ch3list_tuples_4">
+        It is important to note here that the last element of the
+        <span class="emphasis">
+         <em>
+          List
+         </em>
+        </span>
+        has an index of
+-1.
+       </p>
+      </div>
+      <div class="section" title="1.1.2.Concatenating">
+       <div class="titlepage">
+        <div>
+         <div>
+          <h4 class="title">
+           <a name="id3002805">
+           </a>
+           1.1.2.Concatenating
+          </h4>
+         </div>
+        </div>
+       </div>
+       <p id="ch3list_tuples_5">
+        Two or more
+        <span class="emphasis">
+         <em>
+          Lists
+         </em>
+        </span>
+        can be concatenated using the + operator:
+       </p>
+       <pre class="programlisting">
+        &gt;&gt;&gt; a + ['foo', 12, 23.3432, 54]
+[10, 'Python programming', 20.3523, 'foo', 12, 23.3432, 54]
+&gt;&gt;&gt; [54, 75, 23] + ['write', 67, 'read']
+[54, 75, 23, 'write', 67, 'read']
+       </pre>
+      </div>
+      <div class="section" title="1.1.3.Slicing">
+       <div class="titlepage">
+        <div>
+         <div>
+          <h4 class="title">
+           <a name="id3002825">
+           </a>
+           1.1.3.Slicing
+          </h4>
+         </div>
+        </div>
+       </div>
+       <p id="ch3list_tuples_6">
+        A
+        <span class="emphasis">
+         <em>
+          List
+         </em>
+        </span>
+        can be sliced off to contain a subset of elements of the
+        <span class="emphasis">
+         <em>
+          List
+         </em>
+        </span>
+        . Slicing
+can be done by using two indices separated by a colon, where the first index is
+inclusive and the second index is exclusive. The resulting slice is also a
+        <span class="emphasis">
+         <em>
+          List
+         </em>
+        </span>
+        .:
+       </p>
+       <pre class="programlisting">
+        &gt;&gt;&gt; num = [1, 2, 3, 4, 5, 6, 7, 8, 9]
+&gt;&gt;&gt; num[3:6]
+[4, 5, 6]
+&gt;&gt;&gt; num[0:1]
+[1]
+&gt;&gt;&gt; num[7:10]
+[7, 8, 9]
+       </pre>
+       <p id="ch3list_tuples_7">
+        The last example showed how to access last 3 elements of the
+        <span class="emphasis">
+         <em>
+          List
+         </em>
+        </span>
+        . There is a
+small catch here. The second index 10 actually refers to the 11th element of the
+        <span class="emphasis">
+         <em>
+          List
+         </em>
+        </span>
+        which is still valid, even though it doesn't exist because the second
+index is exclusive and tells the Python interpreter to get the last element of
+the
+        <span class="emphasis">
+         <em>
+          List
+         </em>
+        </span>
+        . But this can also be done in a much easier way using negative indices:
+       </p>
+       <pre class="programlisting">
+        &gt;&gt;&gt; num[-3:-1]
+[7, 8, 9]
+       </pre>
+       <p id="ch3list_tuples_8">
+        Excluding the first index implies that the slice must start at the beginning of
+the
+        <span class="emphasis">
+         <em>
+          List
+         </em>
+        </span>
+        , while excluding the second index includes all the elements till the
+end of the
+        <span class="emphasis">
+         <em>
+          List
+         </em>
+        </span>
+        . A third parameter to a slice, which is implicitly taken as 1
+is the step of the slice. It is specified as a value which follows a colon after
+the second index:
+       </p>
+       <pre class="programlisting">
+        &gt;&gt;&gt; num[:4]
+[1, 2, 3, 4]
+&gt;&gt;&gt; num[7:]
+[8, 9]
+&gt;&gt;&gt; num[-3:]
+[7, 8, 9]
+&gt;&gt;&gt; num[:]
+[1, 2, 3, 4, 5, 6, 7, 8, 9]
+&gt;&gt;&gt; num[4:9:3]
+[5, 8]
+&gt;&gt;&gt; num[3::2]
+[4, 6, 8]
+&gt;&gt;&gt; num[::4]
+[1, 5, 9]
+       </pre>
+      </div>
+      <div class="section" title="1.1.4.Multiplication">
+       <div class="titlepage">
+        <div>
+         <div>
+          <h4 class="title">
+           <a name="id3002905">
+           </a>
+           1.1.4.Multiplication
+          </h4>
+         </div>
+        </div>
+       </div>
+       <p id="ch3list_tuples_9">
+        A
+        <span class="emphasis">
+         <em>
+          List
+         </em>
+        </span>
+        can be multiplied with an integer to repeat itself:
+       </p>
+       <pre class="programlisting">
+        &gt;&gt;&gt; [20] * 5
+[20, 20, 20, 20, 20]
+&gt;&gt;&gt; [42, 'Python', 54] * 3
+[42, 'Python', 54, 42, 'Python', 54, 42, 'Python', 54]
+       </pre>
+      </div>
+      <div class="section" title="1.1.5.Membership">
+       <div class="titlepage">
+        <div>
+         <div>
+          <h4 class="title">
+           <a name="id3002929">
+           </a>
+           1.1.5.Membership
+          </h4>
+         </div>
+        </div>
+       </div>
+       <p id="ch3list_tuples_a">
+        <span class="strong">
+         <strong>
+          in
+         </strong>
+        </span>
+        operator is used to find whether an element is part of the
+        <span class="emphasis">
+         <em>
+          List
+         </em>
+        </span>
+        . It
+returns
+        <span class="strong">
+         <strong>
+          True
+         </strong>
+        </span>
+        if the element is present in the
+        <span class="emphasis">
+         <em>
+          List
+         </em>
+        </span>
+        or
+        <span class="strong">
+         <strong>
+          False
+         </strong>
+        </span>
+        if it is not
+present. Since this operator returns a Boolean value it is called a Boolean
+operator:
+       </p>
+       <pre class="programlisting">
+        &gt;&gt;&gt; names = ['Guido', 'Alex', 'Tim']
+&gt;&gt;&gt; 'Tim' in names
+True
+&gt;&gt;&gt; 'Adam' in names
+False
+       </pre>
+      </div>
+      <div class="section" title="1.1.6.Length, Maximum and Minimum">
+       <div class="titlepage">
+        <div>
+         <div>
+          <h4 class="title">
+           <a name="id3002972">
+           </a>
+           1.1.6.Length, Maximum and Minimum
+          </h4>
+         </div>
+        </div>
+       </div>
+       <p id="ch3list_tuples_b">
+        Length of a
+        <span class="emphasis">
+         <em>
+          List
+         </em>
+        </span>
+        can be found out using the len function. The max function
+returns the element with the largest value and the min function returns the
+element with the smallest value:
+       </p>
+       <pre class="programlisting">
+        &gt;&gt;&gt; num = [4, 1, 32, 12, 67, 34, 65]
+&gt;&gt;&gt; len(num)
+7
+&gt;&gt;&gt; max(num)
+67
+&gt;&gt;&gt; min(num)
+1
+       </pre>
+      </div>
+      <div class="section" title="1.1.7.Changing Elements">
+       <div class="titlepage">
+        <div>
+         <div>
+          <h4 class="title">
+           <a name="id3002997">
+           </a>
+           1.1.7.Changing Elements
+          </h4>
+         </div>
+        </div>
+       </div>
+       <p id="ch3list_tuples_c">
+        Unlike Strings
+        <span class="emphasis">
+         <em>
+          Lists
+         </em>
+        </span>
+        are mutable, i.e. elements of a
+        <span class="emphasis">
+         <em>
+          List
+         </em>
+        </span>
+        can be manipulated:
+       </p>
+       <pre class="programlisting">
+        &gt;&gt;&gt; a = [1, 3, 5, 7]
+&gt;&gt;&gt; a[2] = 9
+&gt;&gt;&gt; a
+[1, 3, 9, 7]
+       </pre>
+      </div>
+      <div class="section" title="1.1.8.Deleting Elements">
+       <div class="titlepage">
+        <div>
+         <div>
+          <h4 class="title">
+           <a name="id3003022">
+           </a>
+           1.1.8.Deleting Elements
+          </h4>
+         </div>
+        </div>
+       </div>
+       <p id="ch3list_tuples_d">
+        An element or a slice of a
+        <span class="emphasis">
+         <em>
+          List
+         </em>
+        </span>
+        can be deleted by using the
+        <span class="strong">
+         <strong>
+          del
+         </strong>
+        </span>
+        statement:
+       </p>
+       <pre class="programlisting">
+        &gt;&gt;&gt; a = [1, 3, 5, 7, 9, 11]
+&gt;&gt;&gt; del a[-2:]
+&gt;&gt;&gt; a
+[1, 3, 5, 7]
+&gt;&gt;&gt; del a[1]
+&gt;&gt;&gt; a
+[1, 5, 7]
+       </pre>
+      </div>
+      <div class="section" title="1.1.9.Assign to Slices">
+       <div class="titlepage">
+        <div>
+         <div>
+          <h4 class="title">
+           <a name="id3003050">
+           </a>
+           1.1.9.Assign to Slices
+          </h4>
+         </div>
+        </div>
+       </div>
+       <p id="ch3list_tuples_e">
+        In the same way, values can be assigned to individual elements of the
+        <span class="emphasis">
+         <em>
+          List
+         </em>
+        </span>
+        ,
+a
+        <span class="emphasis">
+         <em>
+          List
+         </em>
+        </span>
+        of elements can be assigned to a slice:
+       </p>
+       <pre class="programlisting">
+        &gt;&gt;&gt; a = [2, 3, 4, 5]
+&gt;&gt;&gt; a[:2] = [0, 1]
+[0, 1, 4, 5]
+&gt;&gt;&gt; a[2:2] = [2, 3]
+&gt;&gt;&gt; a
+[0, 1, 2, 3, 4, 5]
+&gt;&gt;&gt; a[2:4] = []
+&gt;&gt;&gt; a
+[0, 1, 4, 5]
+       </pre>
+       <p id="ch3list_tuples_f">
+        The last two examples should be particularly noted carefully. The last but one
+example insert elements or a list of elements into a
+        <span class="emphasis">
+         <em>
+          List
+         </em>
+        </span>
+        and the last example
+deletes a list of elements from the
+        <span class="emphasis">
+         <em>
+          List
+         </em>
+        </span>
+        .
+       </p>
+      </div>
+     </div>
+     <div class="section" title="1.2.None, Empty Lists, and Initialization">
+      <div class="titlepage">
+       <div>
+        <div>
+         <h3 class="title">
+          <a name="id3003090">
+          </a>
+          1.2.None, Empty Lists, and Initialization
+         </h3>
+        </div>
+       </div>
+      </div>
+      <p id="ch3list_tuples_10">
+       An
+       <span class="emphasis">
+        <em>
+         Empty List
+        </em>
+       </span>
+       is a
+       <span class="emphasis">
+        <em>
+         List
+        </em>
+       </span>
+       with no elements and is simply represented as
+[]. A
+       <span class="emphasis">
+        <em>
+         None List
+        </em>
+       </span>
+       is one with all elements in it being
+       <span class="strong">
+        <strong>
+         None
+        </strong>
+       </span>
+       . It serves
+the purpose having a container list of some fixed number of elements with
+no value:
+      </p>
+      <pre class="programlisting">
+       &gt;&gt;&gt; a = []
+&gt;&gt;&gt; a
+[]
+&gt;&gt;&gt; n = [None] * 10
+&gt;&gt;&gt; n
+[None, None, None, None, None, None, None, None, None, None]
+      </pre>
+     </div>
+     <div class="section" title="1.3.Nested Lists">
+      <div class="titlepage">
+       <div>
+        <div>
+         <h3 class="title">
+          <a name="id3003130">
+          </a>
+          1.3.Nested Lists
+         </h3>
+        </div>
+       </div>
+      </div>
+      <p id="ch3list_tuples_11">
+       As mentioned earlier, a List can contain elements of any data type. This also
+implies a
+       <span class="emphasis">
+        <em>
+         List
+        </em>
+       </span>
+       can have a
+       <span class="emphasis">
+        <em>
+         Lists
+        </em>
+       </span>
+       themselves as its elements. These are
+called as
+       <span class="emphasis">
+        <em>
+         Nested Lists
+        </em>
+       </span>
+       . There is no limit on the depth of the
+       <span class="emphasis">
+        <em>
+         Nested Lists
+        </em>
+       </span>
+       :
+      </p>
+      <pre class="programlisting">
+       &gt;&gt;&gt; a = [1, [1, 2, 3], 3, [1, [1, 2, 3]], 7]
+      </pre>
+     </div>
+     <div class="section" title="1.4.List Methods">
+      <div class="titlepage">
+       <div>
+        <div>
+         <h3 class="title">
+          <a name="id3003165">
+          </a>
+          1.4.List Methods
+         </h3>
+        </div>
+       </div>
+      </div>
+      <p id="ch3list_tuples_12">
+       A method is a function that is coupled to an object. More about objects
+and its methods are discussed in Advanced Python module. In general, a
+method is called like:
+      </p>
+      <pre class="programlisting">
+       object.method(arguments)
+      </pre>
+      <p id="ch3list_tuples_13">
+       For now, it is enough to know that a list of elements is an object and
+so
+       <span class="emphasis">
+        <em>
+         List
+        </em>
+       </span>
+       methods can be called upon them. Also some of the methods change
+the
+       <span class="emphasis">
+        <em>
+         List
+        </em>
+       </span>
+       in-place, meaning it modifies the existing list instead of creating
+a new one, while other methods don't. It must be noted as we run through
+the
+       <span class="emphasis">
+        <em>
+         List
+        </em>
+       </span>
+       methods.
+      </p>
+      <p id="ch3list_tuples_14">
+       Some of the most commonly used
+       <span class="emphasis">
+        <em>
+         List
+        </em>
+       </span>
+       methods are as follows:
+      </p>
+      <div class="section" title="1.4.1.append">
+       <div class="titlepage">
+        <div>
+         <div>
+          <h4 class="title">
+           <a name="id3003212">
+           </a>
+           1.4.1.append
+          </h4>
+         </div>
+        </div>
+       </div>
+       <p id="ch3list_tuples_15">
+        The
+        <span class="emphasis">
+         <em>
+          append
+         </em>
+        </span>
+        method is used to append an object at the end of the list:
+       </p>
+       <pre class="programlisting">
+        &gt;&gt;&gt; prime = [2, 3, 5]
+&gt;&gt;&gt; prime.append(7)
+&gt;&gt;&gt; prime
+[2, 3, 5, 7]
+       </pre>
+       <p id="ch3list_tuples_16">
+        It is important to note that append changes the
+        <span class="emphasis">
+         <em>
+          List
+         </em>
+        </span>
+        in-place.
+       </p>
+      </div>
+      <div class="section" title="1.4.2.count">
+       <div class="titlepage">
+        <div>
+         <div>
+          <h4 class="title">
+           <a name="id3003241">
+           </a>
+           1.4.2.count
+          </h4>
+         </div>
+        </div>
+       </div>
+       <p id="ch3list_tuples_17">
+        The
+        <span class="emphasis">
+         <em>
+          count
+         </em>
+        </span>
+        method returns the number of occurences of a particular element
+in a list:
+       </p>
+       <pre class="programlisting">
+        &gt;&gt;&gt; [1, 4, 4, 9, 9, 9].count(9)
+3
+&gt;&gt;&gt; tlst = ['Python', 'is', 'a', 'beautiful', 'language']
+&gt;&gt;&gt; tlst.count('Python')
+1
+       </pre>
+      </div>
+      <div class="section" title="1.4.3.extend">
+       <div class="titlepage">
+        <div>
+         <div>
+          <h4 class="title">
+           <a name="id3003264">
+           </a>
+           1.4.3.extend
+          </h4>
+         </div>
+        </div>
+       </div>
+       <p id="ch3list_tuples_18">
+        The
+        <span class="emphasis">
+         <em>
+          extend
+         </em>
+        </span>
+        method extends the list on which it is called by the list supplied
+as argument to it:
+       </p>
+       <pre class="programlisting">
+        &gt;&gt;&gt; a = [1, 2, 3]
+&gt;&gt;&gt; b = [4, 5, 6]
+&gt;&gt;&gt; a.extend(b)
+[1, 2, 3, 4, 5, 6]
+       </pre>
+       <p id="ch3list_tuples_19">
+        This is an in-place method. This method is equivalent to using the + operator, but
+using the + operator returns a new list.
+       </p>
+      </div>
+      <div class="section" title="1.4.4.index">
+       <div class="titlepage">
+        <div>
+         <div>
+          <h4 class="title">
+           <a name="id3003292">
+           </a>
+           1.4.4.index
+          </h4>
+         </div>
+        </div>
+       </div>
+       <p id="ch3list_tuples_1a">
+        The
+        <span class="emphasis">
+         <em>
+          index
+         </em>
+        </span>
+        method returns the index position of the element in the list
+specified as argument:
+       </p>
+       <pre class="programlisting">
+        &gt;&gt;&gt; a = [1, 2, 3, ,4, 5]
+&gt;&gt;&gt; a.index(4)
+3
+       </pre>
+      </div>
+      <div class="section" title="1.4.5.insert">
+       <div class="titlepage">
+        <div>
+         <div>
+          <h4 class="title">
+           <a name="id3003311">
+           </a>
+           1.4.5.insert
+          </h4>
+         </div>
+        </div>
+       </div>
+       <p id="ch3list_tuples_1b">
+        The
+        <span class="emphasis">
+         <em>
+          insert
+         </em>
+        </span>
+        method is used to insert an element specified as the second
+argument to the list at the position specified by the first argument:
+       </p>
+       <pre class="programlisting">
+        &gt;&gt;&gt; a = ['Python', 'is', 'cool']
+&gt;&gt;&gt; a.insert(2, 'so')
+&gt;&gt;&gt; a
+['Python', 'is', 'so', 'cool']
+       </pre>
+       <p id="ch3list_tuples_1c">
+        The
+        <span class="emphasis">
+         <em>
+          insert
+         </em>
+        </span>
+        method changes the
+        <span class="emphasis">
+         <em>
+          List
+         </em>
+        </span>
+        in-place.
+       </p>
+      </div>
+      <div class="section" title="1.4.6.pop">
+       <div class="titlepage">
+        <div>
+         <div>
+          <h4 class="title">
+           <a name="id3003346">
+           </a>
+           1.4.6.pop
+          </h4>
+         </div>
+        </div>
+       </div>
+       <p id="ch3list_tuples_1d">
+        The
+        <span class="emphasis">
+         <em>
+          pop
+         </em>
+        </span>
+        method removes an element from the list. The index position
+of the element to be removed can be specified as an argument to the
+        <span class="emphasis">
+         <em>
+          pop
+         </em>
+        </span>
+        method, if not it removes the last element by default:
+       </p>
+       <pre class="programlisting">
+        &gt;&gt;&gt; a = [1, 2, 3, 4, 5]
+&gt;&gt;&gt; a.pop()
+&gt;&gt;&gt; a
+5
+&gt;&gt;&gt; a.pop(2)
+&gt;&gt;&gt; a
+3
+       </pre>
+       <p id="ch3list_tuples_1e">
+        The
+        <span class="emphasis">
+         <em>
+          pop
+         </em>
+        </span>
+        method changes the
+        <span class="emphasis">
+         <em>
+          List
+         </em>
+        </span>
+        in-place.
+       </p>
+      </div>
+      <div class="section" title="1.4.7.remove">
+       <div class="titlepage">
+        <div>
+         <div>
+          <h4 class="title">
+           <a name="id3003383">
+           </a>
+           1.4.7.remove
+          </h4>
+         </div>
+        </div>
+       </div>
+       <p id="ch3list_tuples_1f">
+        The
+        <span class="emphasis">
+         <em>
+          remove
+         </em>
+        </span>
+        method removes the first occurence of an element supplied as a
+parameter:
+       </p>
+       <pre class="programlisting">
+        &gt;&gt;&gt; a = [1, 2, 3, 4, 2, 5, 2]
+&gt;&gt;&gt; a.remove(2)
+&gt;&gt;&gt; a
+[1, 3, 4, 2, 5, 2]
+       </pre>
+      </div>
+      <div class="section" title="1.4.8.reverse">
+       <div class="titlepage">
+        <div>
+         <div>
+          <h4 class="title">
+           <a name="id3003405">
+           </a>
+           1.4.8.reverse
+          </h4>
+         </div>
+        </div>
+       </div>
+       <p id="ch3list_tuples_20">
+        The
+        <span class="emphasis">
+         <em>
+          reverse
+         </em>
+        </span>
+        method reverses elements in the list. It is important to note
+here that
+        <span class="emphasis">
+         <em>
+          reverse
+         </em>
+        </span>
+        method changes the list in-place and doesn't return any
+thing:
+       </p>
+       <pre class="programlisting">
+        &gt;&gt;&gt; a = ['guido', 'alex', 'tim']
+&gt;&gt;&gt; a.reverse()
+&gt;&gt;&gt; a
+['tim', 'alex', 'guido']
+       </pre>
+      </div>
+      <div class="section" title="1.4.9.sort">
+       <div class="titlepage">
+        <div>
+         <div>
+          <h4 class="title">
+           <a name="id3003431">
+           </a>
+           1.4.9.sort
+          </h4>
+         </div>
+        </div>
+       </div>
+       <p id="ch3list_tuples_21">
+        The
+        <span class="emphasis">
+         <em>
+          sort
+         </em>
+        </span>
+        method is used to sort the elements of the list. The
+        <span class="emphasis">
+         <em>
+          sort
+         </em>
+        </span>
+        method
+also sorts in-place and does not return anything:
+       </p>
+       <pre class="programlisting">
+        &gt;&gt;&gt; a = [5, 1, 3, 7, 4]
+&gt;&gt;&gt; a.sort()
+&gt;&gt;&gt; a
+[1, 3, 4, 5, 7]
+       </pre>
+       <p id="ch3list_tuples_22">
+        In addition to the sort method on a
+        <span class="emphasis">
+         <em>
+          List
+         </em>
+        </span>
+        object we can also use the built-in
+        <span class="strong">
+         <strong>
+          sorted
+         </strong>
+        </span>
+        function. This function takes the
+        <span class="emphasis">
+         <em>
+          List
+         </em>
+        </span>
+        as a parameter and returns
+a sorted copy of the list. However the original list is left intact:
+       </p>
+       <pre class="programlisting">
+        &gt;&gt;&gt; a = [5, 1, 3, 7, 4]
+&gt;&gt;&gt; b = sorted(a)
+&gt;&gt;&gt; b
+[1, 3, 4, 5, 7]
+&gt;&gt;&gt; a
+[5, 1, 3, 7, 4]
+       </pre>
+      </div>
+     </div>
+    </div>
+    <div class="section" title="2.Tuples">
+     <div class="titlepage">
+      <div>
+       <div>
+        <h2 class="title" style="clear: both">
+         <a name="id3003481">
+         </a>
+         2.Tuples
+        </h2>
+       </div>
+      </div>
+     </div>
+     <p id="ch3list_tuples_23">
+      <span class="emphasis">
+       <em>
+        Tuples
+       </em>
+      </span>
+      are sequences just like
+      <span class="emphasis">
+       <em>
+        Lists
+       </em>
+      </span>
+      , but they are immutable. In other
+words
+      <span class="emphasis">
+       <em>
+        Tuples
+       </em>
+      </span>
+      provides a way to represent a group of items, where the group
+of items cannot be changed in any way. The syntax of a
+      <span class="emphasis">
+       <em>
+        Tuple
+       </em>
+      </span>
+      is also very
+similar to
+      <span class="emphasis">
+       <em>
+        List
+       </em>
+      </span>
+      . A
+      <span class="emphasis">
+       <em>
+        Tuple
+       </em>
+      </span>
+      is represented with the list of items, called
+elements of the
+      <span class="emphasis">
+       <em>
+        Tuple
+       </em>
+      </span>
+      separated by comma, with the entire list being enclosed
+in parenthesis. It is not compulsory to use parenthesis around a
+      <span class="emphasis">
+       <em>
+        Tuple
+       </em>
+      </span>
+      but
+it may be necessary in some of the cases:
+     </p>
+     <pre class="programlisting">
+      &gt;&gt;&gt; a = 1, 2, 3
+&gt;&gt;&gt; a
+(1, 2, 3)
+&gt;&gt;&gt; b = 1,
+&gt;&gt;&gt; b
+(1,)
+     </pre>
+     <p id="ch3list_tuples_24">
+      It is interesting to note the second example. Just a value followed by a comma
+automatically makes that an element of a
+      <span class="emphasis">
+       <em>
+        Tuple
+       </em>
+      </span>
+      with only one element. It is
+also important to note that, irrespective of input having a parenthesis, the
+output always has a parenthesis.
+     </p>
+     <p id="ch3list_tuples_25">
+      The first example is also known as
+      <span class="emphasis">
+       <em>
+        Tuple packing
+       </em>
+      </span>
+      , because values are being
+packed into a tuple. It is also possible to do
+      <span class="emphasis">
+       <em>
+        Tuple unpacking
+       </em>
+      </span>
+      which is more
+interesting. It is better to understand that by example. Say we have a
+co-ordinate pair from which we need to separate x and y co-ordinates:
+     </p>
+     <pre class="programlisting">
+      &gt;&gt;&gt; a = (1, 2)
+&gt;&gt;&gt; x, y = a
+&gt;&gt;&gt; x
+1
+&gt;&gt;&gt; y
+2
+     </pre>
+     <p id="ch3list_tuples_26">
+      <span class="emphasis">
+       <em>
+        Tuple unpacking
+       </em>
+      </span>
+      also has several other use-cases of which the most interesting
+one is to swap the values of two variables. Using programming languages like C
+would require anywhere around 10 lines of code and an extra temporary variable
+to do this (including all the #include stuff). Python does it in the most
+intuitive way in just one line. Say we want to swap the co-ordinates in the
+above example:
+     </p>
+     <pre class="programlisting">
+      &gt;&gt;&gt; x, y = y, x
+&gt;&gt;&gt; x
+2
+&gt;&gt;&gt; y
+1
+     </pre>
+     <div class="section" title="2.1.Common Tuple Operations">
+      <div class="titlepage">
+       <div>
+        <div>
+         <h3 class="title">
+          <a name="id3003578">
+          </a>
+          2.1.Common Tuple Operations
+         </h3>
+        </div>
+       </div>
+      </div>
+      <p id="ch3list_tuples_27">
+       There is no need to introduce all the
+       <span class="emphasis">
+        <em>
+         Tuple
+        </em>
+       </span>
+       operations again, since
+       <span class="emphasis">
+        <em>
+         Tuples
+        </em>
+       </span>
+       support the following operations that
+       <span class="emphasis">
+        <em>
+         List
+        </em>
+       </span>
+       supports in exactly the same way:
+      </p>
+      <div class="itemizedlist">
+       <ul class="itemizedlist" type="*">
+        <li class="listitem" style="list-style-type: *">
+         <p id="ch3list_tuples_28">
+          Indexing
+         </p>
+        </li>
+        <li class="listitem" style="list-style-type: *">
+         <p id="ch3list_tuples_29">
+          Concatenating
+         </p>
+        </li>
+        <li class="listitem" style="list-style-type: *">
+         <p id="ch3list_tuples_2a">
+          Slicing
+         </p>
+        </li>
+        <li class="listitem" style="list-style-type: *">
+         <p id="ch3list_tuples_2b">
+          Membership
+         </p>
+        </li>
+        <li class="listitem" style="list-style-type: *">
+         <p id="ch3list_tuples_2c">
+          Multiplication
+         </p>
+        </li>
+        <li class="listitem" style="list-style-type: *">
+         <p id="ch3list_tuples_2d">
+          Length, Maximum, Minimum
+         </p>
+        </li>
+       </ul>
+      </div>
+      <p id="ch3list_tuples_2e">
+       The following examples illustrate the above operations:
+      </p>
+      <pre class="programlisting">
+       &gt;&gt;&gt; a = (1, 2, 3, 4, 5, 6)
+&gt;&gt;&gt; a[5]
+6
+&gt;&gt;&gt; b = (7, 8, 9)
+&gt;&gt;&gt; a + b
+(1, 2, 3, 4, 5, 6, 7, 8, 9)
+&gt;&gt;&gt; a[3:5]
+(4, 5)
+&gt;&gt;&gt; 5 in a
+True
+&gt;&gt;&gt; c = (1,)
+&gt;&gt;&gt; c * 5
+(1, 1, 1, 1, 1)
+&gt;&gt;&gt; len(a)
+6
+&gt;&gt;&gt; max(a)
+6
+&gt;&gt;&gt; min(a)
+1
+      </pre>
+      <p id="ch3list_tuples_2f">
+       However the following
+       <span class="emphasis">
+        <em>
+         List
+        </em>
+       </span>
+       operations are not supported by
+       <span class="emphasis">
+        <em>
+         Tuples
+        </em>
+       </span>
+       because
+       <span class="emphasis">
+        <em>
+         Tuples
+        </em>
+       </span>
+       cannot be changed once they are created:
+      </p>
+      <div class="itemizedlist">
+       <ul class="itemizedlist" type="*">
+        <li class="listitem" style="list-style-type: *">
+         <p id="ch3list_tuples_30">
+          Changing elements
+         </p>
+        </li>
+        <li class="listitem" style="list-style-type: *">
+         <p id="ch3list_tuples_31">
+          Deleting elements
+         </p>
+        </li>
+        <li class="listitem" style="list-style-type: *">
+         <p id="ch3list_tuples_32">
+          Assigning to slices
+         </p>
+        </li>
+       </ul>
+      </div>
+      <p id="ch3list_tuples_33">
+       Similarity to
+       <span class="emphasis">
+        <em>
+         Lists
+        </em>
+       </span>
+       leads to the questions like, why not
+       <span class="emphasis">
+        <em>
+         Lists
+        </em>
+       </span>
+       only? Why do
+we even want
+       <span class="emphasis">
+        <em>
+         Tuples
+        </em>
+       </span>
+       ? Can we do the same with
+       <span class="emphasis">
+        <em>
+         Lists
+        </em>
+       </span>
+       ? And the answer is
+       <span class="strong">
+        <strong>
+         Yes
+        </strong>
+       </span>
+       we can do it, but
+       <span class="emphasis">
+        <em>
+         Tuples
+        </em>
+       </span>
+       are helpful at times, like we can return Tuples from
+functions. They are also returned by some built-in functions and methods. And
+also there are some use cases like co-ordinate among other things. So
+       <span class="emphasis">
+        <em>
+         Tuples
+        </em>
+       </span>
+       are helpful.
+      </p>
+     </div>
+    </div>
+    <div class="section" title="3.Additional Syntax">
+     <div class="titlepage">
+      <div>
+       <div>
+        <h2 class="title" style="clear: both">
+         <a name="id3003727">
+         </a>
+         3.Additional Syntax
+        </h2>
+       </div>
+      </div>
+     </div>
+     <p id="ch3list_tuples_34">
+      The following additional syntax are introduced to make it easier to operate on
+      <span class="emphasis">
+       <em>
+        Lists
+       </em>
+      </span>
+      .
+     </p>
+     <div class="section" title="3.1.range()">
+      <div class="titlepage">
+       <div>
+        <div>
+         <h3 class="title">
+          <a name="id3003745">
+          </a>
+          3.1.range()
+         </h3>
+        </div>
+       </div>
+      </div>
+      <p id="ch3list_tuples_35">
+       The
+       <span class="emphasis">
+        <em>
+         range
+        </em>
+       </span>
+       function takes at least one argument and 2 additional optional
+arguments. If two or more arguments are specified, the range function returns
+a list of natural numbers starting from the first argument passed to it to the
+second argument. The third argument, if specified is used as a step. Suppose
+only one argument is specified, then
+       <span class="emphasis">
+        <em>
+         range
+        </em>
+       </span>
+       function returns a list of natural
+numbers starting from 0 upto the argument specified:
+      </p>
+      <pre class="programlisting">
+       &gt;&gt;&gt; range(5, 10, 2)
+[5, 7, 9]
+&gt;&gt;&gt; range(2, 15)
+[2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
+&gt;&gt;&gt; range(12)
+[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
+      </pre>
+     </div>
+     <div class="section" title="3.2.for">
+      <div class="titlepage">
+       <div>
+        <div>
+         <h3 class="title">
+          <a name="id3003777">
+          </a>
+          3.2.for
+         </h3>
+        </div>
+       </div>
+      </div>
+      <p id="ch3list_tuples_36">
+       The
+       <span class="strong">
+        <strong>
+         for
+        </strong>
+       </span>
+       keyword is used as a part of the looping construct. Unlike for loops
+in other languages, Python's for is used to iterate through the elements of
+sequences like
+       <span class="emphasis">
+        <em>
+         Lists
+        </em>
+       </span>
+       ,
+       <span class="emphasis">
+        <em>
+         Tuples
+        </em>
+       </span>
+       ,
+       <span class="emphasis">
+        <em>
+         Dictionaries
+        </em>
+       </span>
+       , etc. The syntax of the for loop
+consists of
+       <span class="strong">
+        <strong>
+         for
+        </strong>
+       </span>
+       , followed by a variable to hold the individual or the current
+element of the list during iteration and
+       <span class="strong">
+        <strong>
+         in
+        </strong>
+       </span>
+       , followed by the sequence and a
+semicolon(':') The next line which is part of the
+       <span class="strong">
+        <strong>
+         for
+        </strong>
+       </span>
+       loop, i.e the statements
+that are part of the loop should start with a new intend:
+      </p>
+      <pre class="programlisting">
+       &gt;&gt;&gt; names = ['Guido', 'Alex', 'Tim']
+&gt;&gt;&gt; for name in names:
+...   print "Name =", name
+...
+Name = Guido
+Name = Alex
+Name = Tim
+      </pre>
+     </div>
+    </div>
+    <div class="section" title="4.Conclusion">
+     <div class="titlepage">
+      <div>
+       <div>
+        <h2 class="title" style="clear: both">
+         <a name="id3003836">
+         </a>
+         4.Conclusion
+        </h2>
+       </div>
+      </div>
+     </div>
+     <p id="ch3list_tuples_37">
+      This section on
+      <span class="emphasis">
+       <em>
+        Lists
+       </em>
+      </span>
+      and
+      <span class="emphasis">
+       <em>
+        Tuples
+       </em>
+      </span>
+      introduces almost all the necessary
+machinary required to work on
+      <span class="emphasis">
+       <em>
+        Lists
+       </em>
+      </span>
+      and
+      <span class="emphasis">
+       <em>
+        Tuples
+       </em>
+      </span>
+      . Topics like how to
+use these data structures in bigger more useful programs will be introduced
+in the subsequent chapters.
+     </p>
+    </div>
+   </div>
+  </div>
+ </body>
+</html>
--- a/SEESenv/web/html/ch4strings_dicts.html	Tue Feb 23 19:56:48 2010 +0530
+++ b/SEESenv/web/html/ch4strings_dicts.html	Thu Feb 25 00:04:27 2010 +0530
@@ -27,7 +27,7 @@
     <dl>
      <dt>
       <span class="article">
-       <a href="#id2691383">
+       <a href="#id2580313">
         Strings
        </a>
       </span>
@@ -36,14 +36,14 @@
       <dl>
        <dt>
         <span class="section">
-         <a href="#id2689970">
+         <a href="#id2578900">
           1. String Formatting
          </a>
         </span>
        </dt>
        <dt>
         <span class="section">
-         <a href="#id2742387">
+         <a href="#id2631317">
           2. String Methods
          </a>
         </span>
@@ -52,7 +52,7 @@
         <dl>
          <dt>
           <span class="section">
-           <a href="#id2742402">
+           <a href="#id2631332">
             2.1.
             <span class="strong">
              <strong>
@@ -64,7 +64,7 @@
          </dt>
          <dt>
           <span class="section">
-           <a href="#id2742432">
+           <a href="#id2631362">
             2.2.
             <span class="strong">
              <strong>
@@ -76,7 +76,7 @@
          </dt>
          <dt>
           <span class="section">
-           <a href="#id2742472">
+           <a href="#id2631402">
             2.3.
             <span class="strong">
              <strong>
@@ -88,7 +88,7 @@
          </dt>
          <dt>
           <span class="section">
-           <a href="#id2742502">
+           <a href="#id2631432">
             2.4.
             <span class="strong">
              <strong>
@@ -100,7 +100,7 @@
          </dt>
          <dt>
           <span class="section">
-           <a href="#id2742559">
+           <a href="#id2631489">
             2.5.
             <span class="strong">
              <strong>
@@ -112,7 +112,7 @@
          </dt>
          <dt>
           <span class="section">
-           <a href="#id2742618">
+           <a href="#id2631548">
             2.6.
             <span class="strong">
              <strong>
@@ -126,14 +126,14 @@
        </dd>
        <dt>
         <span class="section">
-         <a href="#id2742662">
+         <a href="#id2631592">
           3. Introduction to the standard library
          </a>
         </span>
        </dt>
        <dt>
         <span class="section">
-         <a href="#id2742739">
+         <a href="#id2631669">
           4. I/O: Reading and Writing Files
          </a>
         </span>
@@ -142,14 +142,14 @@
         <dl>
          <dt>
           <span class="section">
-           <a href="#id2742769">
+           <a href="#id2631699">
             4.1. Opening Files
            </a>
           </span>
          </dt>
          <dt>
           <span class="section">
-           <a href="#id2742943">
+           <a href="#id2631873">
             4.2. Reading and Writing files
            </a>
           </span>
@@ -158,7 +158,7 @@
        </dd>
        <dt>
         <span class="section">
-         <a href="#id2743108">
+         <a href="#id2632038">
           5. Dictionaries
          </a>
         </span>
@@ -167,7 +167,7 @@
         <dl>
          <dt>
           <span class="section">
-           <a href="#id2743164">
+           <a href="#id2632094">
             5.1.
             <span class="strong">
              <strong>
@@ -179,7 +179,7 @@
          </dt>
          <dt>
           <span class="section">
-           <a href="#id2743228">
+           <a href="#id2632158">
             5.2. Dictionary Methods
            </a>
           </span>
@@ -195,7 +195,7 @@
      <div>
       <div>
        <h2 class="title">
-        <a name="id2691383">
+        <a name="id2580313">
         </a>
         Strings
        </h2>
@@ -212,14 +212,14 @@
      <dl>
       <dt>
        <span class="section">
-        <a href="#id2689970">
+        <a href="#id2578900">
          1. String Formatting
         </a>
        </span>
       </dt>
       <dt>
        <span class="section">
-        <a href="#id2742387">
+        <a href="#id2631317">
          2. String Methods
         </a>
        </span>
@@ -228,7 +228,7 @@
        <dl>
         <dt>
          <span class="section">
-          <a href="#id2742402">
+          <a href="#id2631332">
            2.1.
            <span class="strong">
             <strong>
@@ -240,7 +240,7 @@
         </dt>
         <dt>
          <span class="section">
-          <a href="#id2742432">
+          <a href="#id2631362">
            2.2.
            <span class="strong">
             <strong>
@@ -252,7 +252,7 @@
         </dt>
         <dt>
          <span class="section">
-          <a href="#id2742472">
+          <a href="#id2631402">
            2.3.
            <span class="strong">
             <strong>
@@ -264,7 +264,7 @@
         </dt>
         <dt>
          <span class="section">
-          <a href="#id2742502">
+          <a href="#id2631432">
            2.4.
            <span class="strong">
             <strong>
@@ -276,7 +276,7 @@
         </dt>
         <dt>
          <span class="section">
-          <a href="#id2742559">
+          <a href="#id2631489">
            2.5.
            <span class="strong">
             <strong>
@@ -288,7 +288,7 @@
         </dt>
         <dt>
          <span class="section">
-          <a href="#id2742618">
+          <a href="#id2631548">
            2.6.
            <span class="strong">
             <strong>
@@ -302,14 +302,14 @@
       </dd>
       <dt>
        <span class="section">
-        <a href="#id2742662">
+        <a href="#id2631592">
          3. Introduction to the standard library
         </a>
        </span>
       </dt>
       <dt>
        <span class="section">
-        <a href="#id2742739">
+        <a href="#id2631669">
          4. I/O: Reading and Writing Files
         </a>
        </span>
@@ -318,14 +318,14 @@
        <dl>
         <dt>
          <span class="section">
-          <a href="#id2742769">
+          <a href="#id2631699">
            4.1. Opening Files
           </a>
          </span>
         </dt>
         <dt>
          <span class="section">
-          <a href="#id2742943">
+          <a href="#id2631873">
            4.2. Reading and Writing files
           </a>
          </span>
@@ -334,7 +334,7 @@
       </dd>
       <dt>
        <span class="section">
-        <a href="#id2743108">
+        <a href="#id2632038">
          5. Dictionaries
         </a>
        </span>
@@ -343,7 +343,7 @@
        <dl>
         <dt>
          <span class="section">
-          <a href="#id2743164">
+          <a href="#id2632094">
            5.1.
            <span class="strong">
             <strong>
@@ -355,7 +355,7 @@
         </dt>
         <dt>
          <span class="section">
-          <a href="#id2743228">
+          <a href="#id2632158">
            5.2. Dictionary Methods
           </a>
          </span>
@@ -396,7 +396,7 @@
       <div>
        <div>
         <h2 class="title" style="clear: both">
-         <a name="id2689970">
+         <a name="id2578900">
          </a>
          1.String Formatting
         </h2>
@@ -456,7 +456,7 @@
       <div>
        <div>
         <h2 class="title" style="clear: both">
-         <a name="id2742387">
+         <a name="id2631317">
          </a>
          2.String Methods
         </h2>
@@ -473,7 +473,7 @@
        <div>
         <div>
          <h3 class="title">
-          <a name="id2742402">
+          <a name="id2631332">
           </a>
           2.1.
           <span class="strong">
@@ -510,7 +510,7 @@
        <div>
         <div>
          <h3 class="title">
-          <a name="id2742432">
+          <a name="id2631362">
           </a>
           2.2.
           <span class="strong">
@@ -559,7 +559,7 @@
        <div>
         <div>
          <h3 class="title">
-          <a name="id2742472">
+          <a name="id2631402">
           </a>
           2.3.
           <span class="strong">
@@ -593,7 +593,7 @@
        <div>
         <div>
          <h3 class="title">
-          <a name="id2742502">
+          <a name="id2631432">
           </a>
           2.4.
           <span class="strong">
@@ -660,7 +660,7 @@
        <div>
         <div>
          <h3 class="title">
-          <a name="id2742559">
+          <a name="id2631489">
           </a>
           2.5.
           <span class="strong">
@@ -723,7 +723,7 @@
        <div>
         <div>
          <h3 class="title">
-          <a name="id2742618">
+          <a name="id2631548">
           </a>
           2.6.
           <span class="strong">
@@ -772,7 +772,7 @@
       <div>
        <div>
         <h2 class="title" style="clear: both">
-         <a name="id2742662">
+         <a name="id2631592">
          </a>
          3.Introduction to the standard library
         </h2>
@@ -851,7 +851,7 @@
       <div>
        <div>
         <h2 class="title" style="clear: both">
-         <a name="id2742739">
+         <a name="id2631669">
          </a>
          4.I/O: Reading and Writing Files
         </h2>
@@ -882,7 +882,7 @@
        <div>
         <div>
          <h3 class="title">
-          <a name="id2742769">
+          <a name="id2631699">
           </a>
           4.1.Opening Files
          </h3>
@@ -1064,7 +1064,7 @@
        <div>
         <div>
          <h3 class="title">
-          <a name="id2742943">
+          <a name="id2631873">
           </a>
           4.2.Reading and Writing files
          </h3>
@@ -1076,7 +1076,7 @@
         <div>
          <div>
           <h4 class="title">
-           <a name="id2742952">
+           <a name="id2631882">
            </a>
            4.2.1.
            <span class="strong">
@@ -1123,7 +1123,7 @@
         <div>
          <div>
           <h4 class="title">
-           <a name="id2742991">
+           <a name="id2631921">
            </a>
            4.2.2.
            <span class="strong">
@@ -1165,7 +1165,7 @@
         <div>
          <div>
           <h4 class="title">
-           <a name="id2743026">
+           <a name="id2631956">
            </a>
            4.2.3.
            <span class="strong">
@@ -1231,7 +1231,7 @@
         <div>
          <div>
           <h4 class="title">
-           <a name="id2743084">
+           <a name="id2632015">
            </a>
            4.2.4.
            <span class="strong">
@@ -1259,7 +1259,7 @@
       <div>
        <div>
         <h2 class="title" style="clear: both">
-         <a name="id2743108">
+         <a name="id2632038">
          </a>
          5.Dictionaries
         </h2>
@@ -1323,7 +1323,7 @@
        <div>
         <div>
          <h3 class="title">
-          <a name="id2743164">
+          <a name="id2632094">
           </a>
           5.1.
           <span class="strong">
@@ -1386,7 +1386,7 @@
        <div>
         <div>
          <h3 class="title">
-          <a name="id2743228">
+          <a name="id2632158">
           </a>
           5.2.Dictionary Methods
          </h3>
@@ -1398,7 +1398,7 @@
         <div>
          <div>
           <h4 class="title">
-           <a name="id2743237">
+           <a name="id2632167">
            </a>
            5.2.1.
            <span class="strong">
@@ -1447,7 +1447,7 @@
         <div>
          <div>
           <h4 class="title">
-           <a name="id2743272">
+           <a name="id2632202">
            </a>
            5.2.2.
            <span class="strong">
@@ -1480,7 +1480,7 @@
         <div>
          <div>
           <h4 class="title">
-           <a name="id2743303">
+           <a name="id2632233">
            </a>
            5.2.3.
            <span class="strong">
@@ -1537,7 +1537,7 @@
         <div>
          <div>
           <h4 class="title">
-           <a name="id2743341">
+           <a name="id2632271">
            </a>
            5.2.4.
            <span class="strong">
@@ -1582,7 +1582,7 @@
         <div>
          <div>
           <h4 class="title">
-           <a name="id2743371">
+           <a name="id2632301">
            </a>
            5.2.5.
            <span class="strong">
@@ -1628,7 +1628,7 @@
         <div>
          <div>
           <h4 class="title">
-           <a name="id2743405">
+           <a name="id2632335">
            </a>
            5.2.6.
            <span class="strong">
@@ -1672,7 +1672,7 @@
         <div>
          <div>
           <h4 class="title">
-           <a name="id2743440">
+           <a name="id2632371">
            </a>
            5.2.7.
            <span class="strong">
--- a/SEESenv/web/html/ch5func.html	Tue Feb 23 19:56:48 2010 +0530
+++ b/SEESenv/web/html/ch5func.html	Thu Feb 25 00:04:27 2010 +0530
@@ -27,7 +27,7 @@
     <dl>
      <dt>
       <span class="article">
-       <a href="#id2621478">
+       <a href="#id2777262">
         Functional Approach
        </a>
       </span>
@@ -36,42 +36,42 @@
       <dl>
        <dt>
         <span class="section">
-         <a href="#id2672516">
+         <a href="#id2828300">
           1. Function scope
          </a>
         </span>
        </dt>
        <dt>
         <span class="section">
-         <a href="#id2672574">
+         <a href="#id2828358">
           2. Default Arguments
          </a>
         </span>
        </dt>
        <dt>
         <span class="section">
-         <a href="#id2672613">
+         <a href="#id2828398">
           3. Keyword Arguments
          </a>
         </span>
        </dt>
        <dt>
         <span class="section">
-         <a href="#id2672729">
+         <a href="#id2828514">
           4. Parameter Packing and Unpacking
          </a>
         </span>
        </dt>
        <dt>
         <span class="section">
-         <a href="#id2672829">
+         <a href="#id2828614">
           5. Nested Functions and Scopes
          </a>
         </span>
        </dt>
        <dt>
         <span class="section">
-         <a href="#id2672879">
+         <a href="#id2828663">
           6. map, reduce and filter functions
          </a>
         </span>
@@ -80,7 +80,7 @@
         <dl>
          <dt>
           <span class="section">
-           <a href="#id2673069">
+           <a href="#id2828853">
             6.1. List Comprehensions
            </a>
           </span>
@@ -96,7 +96,7 @@
      <div>
       <div>
        <h2 class="title">
-        <a name="id2621478">
+        <a name="id2777262">
         </a>
         Functional Approach
        </h2>
@@ -113,42 +113,42 @@
      <dl>
       <dt>
        <span class="section">
-        <a href="#id2672516">
+        <a href="#id2828300">
          1. Function scope
         </a>
        </span>
       </dt>
       <dt>
        <span class="section">
-        <a href="#id2672574">
+        <a href="#id2828358">
          2. Default Arguments
         </a>
        </span>
       </dt>
       <dt>
        <span class="section">
-        <a href="#id2672613">
+        <a href="#id2828398">
          3. Keyword Arguments
         </a>
        </span>
       </dt>
       <dt>
        <span class="section">
-        <a href="#id2672729">
+        <a href="#id2828514">
          4. Parameter Packing and Unpacking
         </a>
        </span>
       </dt>
       <dt>
        <span class="section">
-        <a href="#id2672829">
+        <a href="#id2828614">
          5. Nested Functions and Scopes
         </a>
        </span>
       </dt>
       <dt>
        <span class="section">
-        <a href="#id2672879">
+        <a href="#id2828663">
          6. map, reduce and filter functions
         </a>
        </span>
@@ -157,7 +157,7 @@
        <dl>
         <dt>
          <span class="section">
-          <a href="#id2673069">
+          <a href="#id2828853">
            6.1. List Comprehensions
           </a>
          </span>
@@ -330,7 +330,7 @@
       <div>
        <div>
         <h2 class="title" style="clear: both">
-         <a name="id2672516">
+         <a name="id2828300">
          </a>
          1.Function scope
         </h2>
@@ -406,7 +406,7 @@
       <div>
        <div>
         <h2 class="title" style="clear: both">
-         <a name="id2672574">
+         <a name="id2828358">
          </a>
          2.Default Arguments
         </h2>
@@ -454,7 +454,7 @@
       <div>
        <div>
         <h2 class="title" style="clear: both">
-         <a name="id2672613">
+         <a name="id2828398">
          </a>
          3.Keyword Arguments
         </h2>
@@ -592,7 +592,7 @@
       <div>
        <div>
         <h2 class="title" style="clear: both">
-         <a name="id2672729">
+         <a name="id2828514">
          </a>
          4.Parameter Packing and Unpacking
         </h2>
@@ -701,7 +701,7 @@
       <div>
        <div>
         <h2 class="title" style="clear: both">
-         <a name="id2672829">
+         <a name="id2828614">
          </a>
          5.Nested Functions and Scopes
         </h2>
@@ -758,7 +758,7 @@
       <div>
        <div>
         <h2 class="title" style="clear: both">
-         <a name="id2672879">
+         <a name="id2828663">
          </a>
          6.map, reduce and filter functions
         </h2>
@@ -1008,7 +1008,7 @@
        <div>
         <div>
          <h3 class="title">
-          <a name="id2673069">
+          <a name="id2828853">
           </a>
           6.1.List Comprehensions
          </h3>
--- a/SEESenv/web/html/ch6oop.html	Tue Feb 23 19:56:48 2010 +0530
+++ b/SEESenv/web/html/ch6oop.html	Thu Feb 25 00:04:27 2010 +0530
@@ -27,7 +27,7 @@
     <dl>
      <dt>
       <span class="article">
-       <a href="#id2702442">
+       <a href="#id2471018">
         Classes and Objects
        </a>
       </span>
@@ -39,7 +39,7 @@
      <div>
       <div>
        <h2 class="title">
-        <a name="id2702442">
+        <a name="id2471018">
         </a>
         Classes and Objects
        </h2>
--- a/SEESenv/web/html/ch7interim_assessment.html	Tue Feb 23 19:56:48 2010 +0530
+++ b/SEESenv/web/html/ch7interim_assessment.html	Thu Feb 25 00:04:27 2010 +0530
@@ -27,7 +27,7 @@
     <dl>
      <dt>
       <span class="article">
-       <a href="#id2713774">
+       <a href="#id2857408">
         Interim Assessment
        </a>
       </span>
@@ -39,7 +39,7 @@
      <div>
       <div>
        <h2 class="title">
-        <a name="id2713774">
+        <a name="id2857408">
         </a>
         Interim Assessment
        </h2>
--- a/SEESenv/web/html/ch8ult_module_plan.html	Tue Feb 23 19:56:48 2010 +0530
+++ b/SEESenv/web/html/ch8ult_module_plan.html	Thu Feb 25 00:04:27 2010 +0530
@@ -27,7 +27,7 @@
     <dl>
      <dt>
       <span class="article">
-       <a href="#id2772279">
+       <a href="#id2591236">
         Using Linux Tools
        </a>
       </span>
@@ -36,14 +36,14 @@
       <dl>
        <dt>
         <span class="section">
-         <a href="#id2582324">
+         <a href="#id2401281">
           1. Module Objectives
          </a>
         </span>
        </dt>
        <dt>
         <span class="section">
-         <a href="#id2823235">
+         <a href="#id2642192">
           2. Suggested Reading
          </a>
         </span>
@@ -57,7 +57,7 @@
      <div>
       <div>
        <h2 class="title">
-        <a name="id2772279">
+        <a name="id2591236">
         </a>
         Using Linux Tools
        </h2>
@@ -74,14 +74,14 @@
      <dl>
       <dt>
        <span class="section">
-        <a href="#id2582324">
+        <a href="#id2401281">
          1. Module Objectives
         </a>
        </span>
       </dt>
       <dt>
        <span class="section">
-        <a href="#id2823235">
+        <a href="#id2642192">
          2. Suggested Reading
         </a>
        </span>
@@ -93,7 +93,7 @@
       <div>
        <div>
         <h2 class="title" style="clear: both">
-         <a name="id2582324">
+         <a name="id2401281">
          </a>
          1.Module Objectives
         </h2>
@@ -138,7 +138,7 @@
       <div>
        <div>
         <h2 class="title" style="clear: both">
-         <a name="id2823235">
+         <a name="id2642192">
          </a>
          2.Suggested Reading
         </h2>
--- a/SEESenv/web/html/ch9Using_Linux_Tools.html	Tue Feb 23 19:56:48 2010 +0530
+++ b/SEESenv/web/html/ch9Using_Linux_Tools.html	Thu Feb 25 00:04:27 2010 +0530
@@ -1,411 +1,1942 @@
 <html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>Chapter 1. </title>
-<link rel="stylesheet" href="hgbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
-</head>
-<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="chapter" title="Chapter 1. ">
-<div class="titlepage"></div>
-<div class="toc">
-<p><b>Table of Contents</b></p>
-<dl>
-<dt><span class="article"><a href="#id2894749"></a></span></dt>
-<dd><dl>
-<dt><span class="section"><a href="#id2704840">1. Introducing Linux</a></span></dt>
-<dd><dl>
-<dt><span class="section"><a href="#id2702510">1.1. Historical Background</a></span></dt>
-<dt><span class="section"><a href="#id2945802">1.2. Design and Implications</a></span></dt>
-<dt><span class="section"><a href="#id2946086">1.3. Reasons for Using Linux</a></span></dt>
-</dl></dd>
-<dt><span class="section"><a href="#id2946227">2. Getting Started</a></span></dt>
-<dd><dl><dt><span class="section"><a href="#id2946236">2.1. Logging in, activating the user interface and logging out</a></span></dt></dl></dd>
-<dt><span class="section"><a href="#id2946515">3. Basic Commands</a></span></dt>
-<dd><dl>
-<dt><span class="section"><a href="#id2946524">3.1. ls</a></span></dt>
-<dt><span class="section"><a href="#id2946687">3.2. date</a></span></dt>
-<dt><span class="section"><a href="#id2946747">3.3. cd</a></span></dt>
-<dt><span class="section"><a href="#id2946849">3.4. who</a></span></dt>
-<dt><span class="section"><a href="#id2946932">3.5. mkdir</a></span></dt>
-</dl></dd>
-<dt><span class="section"><a href="#id2947099">4. Getting Help</a></span></dt>
-<dd><dl>
-<dt><span class="section"><a href="#id2947108">4.1. apropos and whatis</a></span></dt>
-<dt><span class="section"><a href="#id2947202">4.2. man</a></span></dt>
-<dt><span class="section"><a href="#id2947396">4.3. info</a></span></dt>
-<dt><span class="section"><a href="#id2947484">4.4. --help</a></span></dt>
-</dl></dd>
-<dt><span class="section"><a href="#id2947536">5. Basic file handling</a></span></dt>
-<dd><dl>
-<dt><span class="section"><a href="#id2947545">5.1. cp</a></span></dt>
-<dt><span class="section"><a href="#id2947858">5.2. mv</a></span></dt>
-<dt><span class="section"><a href="#id2947990">5.3. rm</a></span></dt>
-</dl></dd>
-<dt><span class="section"><a href="#id2948158">6. Command Line Arguments</a></span></dt>
-<dt><span class="section"><a href="#id2948251">7. Basic Text Processing</a></span></dt>
-<dd><dl>
-<dt><span class="section"><a href="#id2948260">7.1. head</a></span></dt>
-<dt><span class="section"><a href="#id2948347">7.2. tail</a></span></dt>
-<dt><span class="section"><a href="#id2948475">7.3. cut</a></span></dt>
-<dt><span class="section"><a href="#id2948562">7.4. paste</a></span></dt>
-</dl></dd>
-<dt><span class="section"><a href="#id2948682">8. Shell Meta Characters</a></span></dt>
-<dt><span class="section"><a href="#id2948789">9. Looking At Files</a></span></dt>
-<dd><dl>
-<dt><span class="section"><a href="#id2948797">9.1. cat</a></span></dt>
-<dt><span class="section"><a href="#id2948985">9.2. more</a></span></dt>
-<dt><span class="section"><a href="#id2949096">9.3. less</a></span></dt>
-</dl></dd>
-<dt><span class="section"><a href="#id2949337">10. Directory Structure</a></span></dt>
-<dd><dl>
-<dt><span class="section"><a href="#id2949602">10.1. man hier</a></span></dt>
-<dt><span class="section"><a href="#id2949618">10.2. ls -l</a></span></dt>
-</dl></dd>
-<dt><span class="section"><a href="#id2949641">11. Permissions and Ownership</a></span></dt>
-<dd><dl><dt><span class="section"><a href="#id2949650">11.1. chmod</a></span></dt></dl></dd>
-<dt><span class="section"><a href="#id2945091">12. Redirection and Piping</a></span></dt>
-<dd><dl>
-<dt><span class="section"><a href="#id2950576">12.1. Redirecting standard input and standard output</a></span></dt>
-<dt><span class="section"><a href="#id2950645">12.2. Piping</a></span></dt>
-<dt><span class="section"><a href="#id2950707">12.3. Redirecting to and from the standard file handles</a></span></dt>
-<dt><span class="section"><a href="#id2950901">12.4. Chained pipelines</a></span></dt>
-<dt><span class="section"><a href="#id2950934">12.5. Redirect to multiple outputs</a></span></dt>
-</dl></dd>
-<dt><span class="section"><a href="#id2950964">13. More Text Processing</a></span></dt>
-<dd><dl>
-<dt><span class="section"><a href="#id2950973">13.1. grep</a></span></dt>
-<dt><span class="section"><a href="#id2951162">13.2. tr</a></span></dt>
-</dl></dd>
-<dt><span class="section"><a href="#id2951309">14. Elementary Regex</a></span></dt>
-<dd><dl><dt><span class="section"><a href="#id2951511">14.1. Lazy quantification</a></span></dt></dl></dd>
-<dt><span class="section"><a href="#id2951586">15. One Liners</a></span></dt>
-</dl></dd>
-</dl>
-</div>
-<div class="article">
-<div class="titlepage">
-<div>
-<div><h2 class="title"><a name="id2894749"></a></h2></div>
-<div><h2 class="title"><a name="id2894749"></a></h2></div>
-</div>
-<hr>
-</div>
-<div class="toc">
-<p><b>Table of Contents</b></p>
-<dl>
-<dt><span class="section"><a href="#id2704840">1. Introducing Linux</a></span></dt>
-<dd><dl>
-<dt><span class="section"><a href="#id2702510">1.1. Historical Background</a></span></dt>
-<dt><span class="section"><a href="#id2945802">1.2. Design and Implications</a></span></dt>
-<dt><span class="section"><a href="#id2946086">1.3. Reasons for Using Linux</a></span></dt>
-</dl></dd>
-<dt><span class="section"><a href="#id2946227">2. Getting Started</a></span></dt>
-<dd><dl><dt><span class="section"><a href="#id2946236">2.1. Logging in, activating the user interface and logging out</a></span></dt></dl></dd>
-<dt><span class="section"><a href="#id2946515">3. Basic Commands</a></span></dt>
-<dd><dl>
-<dt><span class="section"><a href="#id2946524">3.1. ls</a></span></dt>
-<dt><span class="section"><a href="#id2946687">3.2. date</a></span></dt>
-<dt><span class="section"><a href="#id2946747">3.3. cd</a></span></dt>
-<dt><span class="section"><a href="#id2946849">3.4. who</a></span></dt>
-<dt><span class="section"><a href="#id2946932">3.5. mkdir</a></span></dt>
-</dl></dd>
-<dt><span class="section"><a href="#id2947099">4. Getting Help</a></span></dt>
-<dd><dl>
-<dt><span class="section"><a href="#id2947108">4.1. apropos and whatis</a></span></dt>
-<dt><span class="section"><a href="#id2947202">4.2. man</a></span></dt>
-<dt><span class="section"><a href="#id2947396">4.3. info</a></span></dt>
-<dt><span class="section"><a href="#id2947484">4.4. --help</a></span></dt>
-</dl></dd>
-<dt><span class="section"><a href="#id2947536">5. Basic file handling</a></span></dt>
-<dd><dl>
-<dt><span class="section"><a href="#id2947545">5.1. cp</a></span></dt>
-<dt><span class="section"><a href="#id2947858">5.2. mv</a></span></dt>
-<dt><span class="section"><a href="#id2947990">5.3. rm</a></span></dt>
-</dl></dd>
-<dt><span class="section"><a href="#id2948158">6. Command Line Arguments</a></span></dt>
-<dt><span class="section"><a href="#id2948251">7. Basic Text Processing</a></span></dt>
-<dd><dl>
-<dt><span class="section"><a href="#id2948260">7.1. head</a></span></dt>
-<dt><span class="section"><a href="#id2948347">7.2. tail</a></span></dt>
-<dt><span class="section"><a href="#id2948475">7.3. cut</a></span></dt>
-<dt><span class="section"><a href="#id2948562">7.4. paste</a></span></dt>
-</dl></dd>
-<dt><span class="section"><a href="#id2948682">8. Shell Meta Characters</a></span></dt>
-<dt><span class="section"><a href="#id2948789">9. Looking At Files</a></span></dt>
-<dd><dl>
-<dt><span class="section"><a href="#id2948797">9.1. cat</a></span></dt>
-<dt><span class="section"><a href="#id2948985">9.2. more</a></span></dt>
-<dt><span class="section"><a href="#id2949096">9.3. less</a></span></dt>
-</dl></dd>
-<dt><span class="section"><a href="#id2949337">10. Directory Structure</a></span></dt>
-<dd><dl>
-<dt><span class="section"><a href="#id2949602">10.1. man hier</a></span></dt>
-<dt><span class="section"><a href="#id2949618">10.2. ls -l</a></span></dt>
-</dl></dd>
-<dt><span class="section"><a href="#id2949641">11. Permissions and Ownership</a></span></dt>
-<dd><dl><dt><span class="section"><a href="#id2949650">11.1. chmod</a></span></dt></dl></dd>
-<dt><span class="section"><a href="#id2945091">12. Redirection and Piping</a></span></dt>
-<dd><dl>
-<dt><span class="section"><a href="#id2950576">12.1. Redirecting standard input and standard output</a></span></dt>
-<dt><span class="section"><a href="#id2950645">12.2. Piping</a></span></dt>
-<dt><span class="section"><a href="#id2950707">12.3. Redirecting to and from the standard file handles</a></span></dt>
-<dt><span class="section"><a href="#id2950901">12.4. Chained pipelines</a></span></dt>
-<dt><span class="section"><a href="#id2950934">12.5. Redirect to multiple outputs</a></span></dt>
-</dl></dd>
-<dt><span class="section"><a href="#id2950964">13. More Text Processing</a></span></dt>
-<dd><dl>
-<dt><span class="section"><a href="#id2950973">13.1. grep</a></span></dt>
-<dt><span class="section"><a href="#id2951162">13.2. tr</a></span></dt>
-</dl></dd>
-<dt><span class="section"><a href="#id2951309">14. Elementary Regex</a></span></dt>
-<dd><dl><dt><span class="section"><a href="#id2951511">14.1. Lazy quantification</a></span></dt></dl></dd>
-<dt><span class="section"><a href="#id2951586">15. One Liners</a></span></dt>
-</dl>
-</div>
-<div class="section" title="1. Introducing Linux">
-<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="id2704840"></a>1. Introducing Linux</h2></div></div></div>
-<p><a name="ch9Using_Linux_Tools_1"></a>(Attribution : A significant chunk of the content under this section is based on data from Wikipedia and the Linux Documentation Project)</p>
-<p><a name="ch9Using_Linux_Tools_2"></a>Linux (usually pronounced ˈlɪnəks') is a generic term referring to Unix-like computer operating systems based on the Linux kernel, where a kernel is the intermediate layer between the hardware and the applications. The kernel is, on an abstract level, the core of (most) operating systems, that manages the various system resources. The development of the Linux OS is considered the basis for Free and Open Source Software (FOSS) collaboration since typically the underlying source code can be used, modified freely, and redistributed by anyone under the terms of the GNU (a recursive acronym for "GNU's Not Unix!") Global Public License (GPL) and other free software licences. This freedom to access and reuse various components of a system, is one of the primary reasons for the popularity of Linux.</p>
-<p><a name="ch9Using_Linux_Tools_3"></a>Linux is installed on a variety of computer hardware, that include mobile phones, embedded devices and supercomputers, but is infamous for its use in servers.</p>
-<p><a name="ch9Using_Linux_Tools_4"></a>The name "Linux"  comes from the Linux kernel, originally written in 1991 by Linus Torvalds. The rest of the system usually comprises components such as the Apache HTTP Server, the X Window System, the GNOME and KDE desktop environments, and utilities and libraries from the GNU Project (announced in 1983 by Richard Stallman). Commonly-used applications with desktop Linux systems include the Mozilla Firefox web-browser and the OpenOffice.org office application suite. The GNU contribution is the basis for the Free Software Foundation's preferred name GNU/Linux. The kernel's mascot is a penguin named "Tux". Mozilla Firefox and OpenOffice.org are open-source projects which can be run on most Operating Systems, including proprietary ones.</p>
-<div class="section" title="1.1. Historical Background">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="id2702510"></a>1.1. Historical Background</h3></div></div></div>
-<div class="section" title="1.1.1. Events leading to the creation">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="id2893239"></a>1.1.1. Events leading to the creation</h4></div></div></div>
-<div class="itemizedlist"><ul class="itemizedlist" type="*">
-<li class="listitem" style="list-style-type: *"><p><a name="ch9Using_Linux_Tools_5"></a>The Unix operating system was developed in the 1960s and released for public use in 1970. Its accessibility and portability caused it to be widely adopted, copied and modified by academic institutions and businesses. Its design became influential to authors of other systems. Other free operating systems include the Berkeley Software Distribution (BSD), developed at the University of California at Berkeley, and MINIX which was released by Andrew S. Tanenbaum. The development and adoption of BSD and MINIX were limited due to various reasons, and this lack of a widely-adopted and free kernel triggered Linus Torvalds into starting his project.</p></li>
-<li class="listitem" style="list-style-type: *"><p><a name="ch9Using_Linux_Tools_6"></a>In 1983, Richard Stallman started the GNU project with the goal of creating a free UNIX-like operating system. As part of this work, he wrote the GNU General Public License (GPL). By the early 1990s there was almost enough available software to create a full operating system. However, the GNU kernel, called Hurd, failed to attract enough attention from developers leaving GNU incomplete.</p></li>
-</ul></div>
-</div>
-<div class="section" title="1.1.2. The Creation of Linux">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="id2945768"></a>1.1.2. The Creation of Linux</h4></div></div></div>
-<p><a name="ch9Using_Linux_Tools_7"></a>In 1991, Linus Torvalds began a project at the University of Helsinki that later became the Linux kernel. It was initially a terminal (command-line) emulator, which Torvalds used to access the large UNIX servers of the university. He wrote the program targeting just the hardware he was using and independent of an operating system because he wanted to use the functions of his computer with an 80386 processor. Development was done on Minix using the GNU C compiler. This application is still the main choice for compiling Linux today (although the code can be built with other compilers, such as the Intel C Compiler).</p>
-<p><a name="ch9Using_Linux_Tools_8"></a>Torvalds continues to direct the development of the kernel. Stallman heads the Free Software Foundation, which in turn supports the GNU components. Finally, individuals and corporations develop third-party non-GNU components, which constitute a vast body of work and including kernel modules, and user applications and libraries. Linux vendors and communities combine and distribute the kernel, GNU components, and non-GNU components, with additional package management software in the form of Linux distributions.</p>
-</div>
-</div>
-<div class="section" title="1.2. Design and Implications">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="id2945802"></a>1.2. Design and Implications</h3></div></div></div>
-<p><a name="ch9Using_Linux_Tools_9"></a>A Linux-based system is a modular Unix-like operating system, deriving much of its basic design from principles established in Unix earlier. Such a system uses a monolithic kernel, called the Linux kernel, which handles process control, networking, and peripheral and file system access. Device drivers are integrated directly with the kernel. Separate projects that interface with the kernel provide much of the system's higher-level functionality. The GNU userland is an important part of most Linux-based systems, providing the most common implementation of the C library, a popular shell, and many of the common Unix tools which carry out many basic operating system tasks. The graphical user interface (or GUI) used by most Linux systems is based on the "X Window System".</p>
-<div class="section" title="1.2.1. User Interface">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="id2945827"></a>1.2.1. User Interface</h4></div></div></div>
-<p><a name="ch9Using_Linux_Tools_a"></a>Users can control a Linux-based system through a command line interface (or CLI), a graphical user interface (or GUI), or through controls attached to the associated hardware (this is common for embedded systems). For desktop systems, the default mode is usually the GUI. On desktop machines, "KDE", "GNOME" and "Xfce" are the most popular user interfaces,though a variety of additional user interfaces exist. Most popular user interfaces run on top of the "X Window System" (or X), which enables a graphical application running on one machine to be displayed and controlled from another in a network.</p>
-<p><a name="ch9Using_Linux_Tools_b"></a>A Linux system also provides a CLI of some sort through a shell, which is the traditional way of interacting with a Unix system. A Linux distribution specialized for servers may use the CLI as its only interface. A “headless system” (system run without even a monitor) can be controlled by the command line via a remote-control protocol such as SSH or telnet. The CLI is particularly suited for automation of repetitive or delayed tasks, and provides very simple inter-process communication. A graphical terminal emulator program is often used to access the CLI from a Linux desktop.</p>
-</div>
-<div class="section" title="1.2.2. Development">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="id2945881"></a>1.2.2. Development</h4></div></div></div>
-<p><a name="ch9Using_Linux_Tools_c"></a>The primary difference between Linux and many other popular contemporary operating systems is that the Linux kernel and other components are free and open source software. Linux is not the only such operating system, although it is by far the most widely used. Some free and open source software licenses are based on the principle of "copyleft", a kind of reciprocity: any work derived from a copyleft piece of software must also be copyleft itself. The most common free software license, the GNU GPL, is a form of copyleft, and is used for the Linux kernel and many of the components from the GNU project.</p>
-<p><a name="ch9Using_Linux_Tools_d"></a>Linux based distributions are intended by developers for interoperability with other operating systems and established computing standards. Linux systems adhere to POSIX, SUS, ISO and ANSI standards where possible, although to date only one Linux distribution has been POSIX.1 certified, Linux-FT.Free software projects, although developed in a collaborative fashion, are often produced independently of each other. The fact that the software licenses explicitly permit redistribution, however, provides a basis for larger scale projects that collect the software produced by stand-alone projects and make it available all at once in the form of a Linux distribution.</p>
-<p><a name="ch9Using_Linux_Tools_e"></a>A Linux distribution, commonly called a "distro", is a project that manages a remote collection of system software and application software packages available for download and installation through a network connection. This allows the user to adapt the operating system to his/her specific needs. Distributions are maintained by individuals, loose-knit teams, volunteer organizations, and commercial entities. A distribution can be installed using a CD that contains distribution-specific software for initial system installation and configuration. A package manager such as Synaptic or YAST allows later package upgrades and installations. A distribution is responsible for the default configuration of the installed Linux kernel, general system security, and more generally integration of the different software packages into a coherent whole.</p>
-</div>
-<div class="section" title="1.2.3. Community">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="id2945948"></a>1.2.3. Community</h4></div></div></div>
-<p><a name="ch9Using_Linux_Tools_f"></a>A distribution is largely driven by its developer and user communities. Some vendors develop and fund their distributions on a volunteer basis. Examples include Debian and the Debian-based, Ubuntu. Others maintain a community version of their commercial distributions, as Red Hat does with Fedora.</p>
-<p><a name="ch9Using_Linux_Tools_10"></a>In many cities and regions, local associations known as Linux Users Groups (LUGs) seek to promote their preferred distribution and by extension free software. They hold meetings and provide free demonstrations, training, technical support, and operating system installation to new users. Many Internet communities also provide support to Linux users and developers. Most distributions and free software / open source projects have IRC (Internet Relay Chat) chatrooms or newsgroups. Online forums are another means for support. Linux distributions host mailing lists; commonly there will be a specific topic such as usage or development for a given list. All these can be found simply by running an appropriate search on Google.</p>
-<p><a name="ch9Using_Linux_Tools_11"></a>Although Linux distributions are generally available without charge, several large corporations sell, support, and contribute to the development of the components of the system and of free software. These include Dell, IBM, HP, Oracle, Sun Microsystems, Novell, Nokia. A number of corporations, notably Red Hat, have built their entire business around Linux distributions.</p>
-</div>
-<div class="section" title="1.2.4. Can I make a profit out of running a business involving Linux?">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="id2945993"></a>1.2.4. Can I make a profit out of running a business involving Linux?</h4></div></div></div>
-<p><a name="ch9Using_Linux_Tools_12"></a>The answer is, "Yes!". The free software licenses, on which the various software packages of a distribution built on the Linux kernel are based, explicitly accommodate and encourage commercialization; the relationship between a Linux distribution as a whole and individual vendors may be seen as symbiotic. One common business model of commercial suppliers is charging for support, especially for business users. A number of companies also offer a specialized business version of their distribution, which adds proprietary support packages and tools to administer higher numbers of installations or to simplify administrative tasks. Another business model is to give away the software in order to sell hardware. Examples of corporations that are extensively (and sometimes exclusively) open-source and Linux-powered , with successful revenue generation models involving these, are Google, SUN, Mozilla, etc.</p>
-</div>
-<div class="section" title="1.2.5. Programming on Linux">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="id2946039"></a>1.2.5. Programming on Linux</h4></div></div></div>
-<p><a name="ch9Using_Linux_Tools_13"></a>Most Linux distributions support dozens of programming languages. The most common collection of utilities for building both Linux applications and operating system programs is found within the GNU toolchain, which includes the GNU Compiler Collection (GCC) and the GNU build system. Amongst others, GCC provides compilers for Ada, C, C++, Java, and Fortran. The Linux kernel itself is written to be compiled with GCC. Proprietary compilers for Linux include the Intel C++ Compiler, Sun Studio, and IBM XL C/C++ Compiler.</p>
-<p><a name="ch9Using_Linux_Tools_14"></a>Most distributions also include support for PHP, Perl, Ruby, Python and other dynamic languages. Examples of languages that are less common, but still supported, are C# via the Mono project, sponsored by Novell, and Scheme. A number of Java Virtual Machines and development kits run on Linux, including the original Sun Microsystems JVM (HotSpot), and IBM's J2SE RE, as well as many open-source projects like Kaffe.</p>
-<p><a name="ch9Using_Linux_Tools_15"></a>The two main frameworks for developing graphical applications are those of GNOME and KDE. These projects are based on the GTK+ and Qt widget toolkits, respectively, which can also be used independently of the larger framework. Both support a wide variety of languages. There are a number of Integrated Development Environments (IDEs) available including Anjuta, Code::Blocks, Eclipse, KDevelop, Lazarus, MonoDevelop, NetBeans, and Omnis Studio while the long-established editors Vim and Emacs remain popular.</p>
-</div>
-</div>
-<div class="section" title="1.3. Reasons for Using Linux">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="id2946086"></a>1.3. Reasons for Using Linux</h3></div></div></div>
-<div class="itemizedlist"><ul class="itemizedlist" type="*"><li class="listitem" style="list-style-type: *"><p><a name="ch9Using_Linux_Tools_16"></a>Linux is free:</p></li></ul></div>
-<p><a name="ch9Using_Linux_Tools_17"></a>As in "free beer". Linux can be downloaded in its entirety from the Internet completely for free. No registration fees, no costs per user, free updates, and freely available source code in case you want to change the behavior of your system.
+ <head>
+  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+  <title>
+   Chapter. Using_Linux_Tools
+  </title>
+  <link rel="stylesheet" href="/review/support/styles.css" type="text/css" />
+  <meta name="generator" content="DocBook XSL Stylesheets V1.74.3" />
+  <link rel="shortcut icon" type="image/png" href="/review/support/figs/favicon.png" />
+  <script type="text/javascript" src="/review/support/jquery-min.js">
+  </script>
+  <script type="text/javascript" src="/review/support/form.js">
+  </script>
+  <script type="text/javascript" src="/review/support/hsbook.js">
+  </script>
+ </head>
+ <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+  <div class="chapter" id="ch9Using_Linux_Tools">
+   <div class="titlepage">
+   </div>
+   <div class="toc">
+    <p>
+     <b>
+      Table of Contents
+     </b>
+    </p>
+    <dl>
+     <dt>
+      <span class="article">
+       <a href="#id2573418">
+       </a>
+      </span>
+     </dt>
+     <dd>
+      <dl>
+       <dt>
+        <span class="section">
+         <a href="#id2383509">
+          1. Introducing Linux
+         </a>
+        </span>
+       </dt>
+       <dd>
+        <dl>
+         <dt>
+          <span class="section">
+           <a href="#id2381179">
+            1.1. Historical Background
+           </a>
+          </span>
+         </dt>
+         <dt>
+          <span class="section">
+           <a href="#id2624471">
+            1.2. Design and Implications
+           </a>
+          </span>
+         </dt>
+         <dt>
+          <span class="section">
+           <a href="#id2624755">
+            1.3. Reasons for Using Linux
+           </a>
+          </span>
+         </dt>
+        </dl>
+       </dd>
+       <dt>
+        <span class="section">
+         <a href="#id2624896">
+          2. Getting Started
+         </a>
+        </span>
+       </dt>
+       <dd>
+        <dl>
+         <dt>
+          <span class="section">
+           <a href="#id2624904">
+            2.1. Logging in, activating the user interface and logging out
+           </a>
+          </span>
+         </dt>
+        </dl>
+       </dd>
+       <dt>
+        <span class="section">
+         <a href="#id2625184">
+          3. Basic Commands
+         </a>
+        </span>
+       </dt>
+       <dd>
+        <dl>
+         <dt>
+          <span class="section">
+           <a href="#id2625193">
+            3.1. ls
+           </a>
+          </span>
+         </dt>
+         <dt>
+          <span class="section">
+           <a href="#id2625356">
+            3.2. date
+           </a>
+          </span>
+         </dt>
+         <dt>
+          <span class="section">
+           <a href="#id2625416">
+            3.3. cd
+           </a>
+          </span>
+         </dt>
+         <dt>
+          <span class="section">
+           <a href="#id2625517">
+            3.4. who
+           </a>
+          </span>
+         </dt>
+         <dt>
+          <span class="section">
+           <a href="#id2625600">
+            3.5. mkdir
+           </a>
+          </span>
+         </dt>
+        </dl>
+       </dd>
+       <dt>
+        <span class="section">
+         <a href="#id2625768">
+          4. Getting Help
+         </a>
+        </span>
+       </dt>
+       <dd>
+        <dl>
+         <dt>
+          <span class="section">
+           <a href="#id2625776">
+            4.1. apropos and whatis
+           </a>
+          </span>
+         </dt>
+         <dt>
+          <span class="section">
+           <a href="#id2625871">
+            4.2. man
+           </a>
+          </span>
+         </dt>
+         <dt>
+          <span class="section">
+           <a href="#id2626065">
+            4.3. info
+           </a>
+          </span>
+         </dt>
+         <dt>
+          <span class="section">
+           <a href="#id2626152">
+            4.4. --help
+           </a>
+          </span>
+         </dt>
+        </dl>
+       </dd>
+       <dt>
+        <span class="section">
+         <a href="#id2626205">
+          5. Basic file handling
+         </a>
+        </span>
+       </dt>
+       <dd>
+        <dl>
+         <dt>
+          <span class="section">
+           <a href="#id2626214">
+            5.1. cp
+           </a>
+          </span>
+         </dt>
+         <dt>
+          <span class="section">
+           <a href="#id2626526">
+            5.2. mv
+           </a>
+          </span>
+         </dt>
+         <dt>
+          <span class="section">
+           <a href="#id2626659">
+            5.3. rm
+           </a>
+          </span>
+         </dt>
+        </dl>
+       </dd>
+       <dt>
+        <span class="section">
+         <a href="#id2626827">
+          6. Command Line Arguments
+         </a>
+        </span>
+       </dt>
+       <dt>
+        <span class="section">
+         <a href="#id2626920">
+          7. Basic Text Processing
+         </a>
+        </span>
+       </dt>
+       <dd>
+        <dl>
+         <dt>
+          <span class="section">
+           <a href="#id2626929">
+            7.1. head
+           </a>
+          </span>
+         </dt>
+         <dt>
+          <span class="section">
+           <a href="#id2627016">
+            7.2. tail
+           </a>
+          </span>
+         </dt>
+         <dt>
+          <span class="section">
+           <a href="#id2627144">
+            7.3. cut
+           </a>
+          </span>
+         </dt>
+         <dt>
+          <span class="section">
+           <a href="#id2627231">
+            7.4. paste
+           </a>
+          </span>
+         </dt>
+        </dl>
+       </dd>
+       <dt>
+        <span class="section">
+         <a href="#id2627351">
+          8. Shell Meta Characters
+         </a>
+        </span>
+       </dt>
+       <dt>
+        <span class="section">
+         <a href="#id2627457">
+          9. Looking At Files
+         </a>
+        </span>
+       </dt>
+       <dd>
+        <dl>
+         <dt>
+          <span class="section">
+           <a href="#id2627466">
+            9.1. cat
+           </a>
+          </span>
+         </dt>
+         <dt>
+          <span class="section">
+           <a href="#id2627654">
+            9.2. more
+           </a>
+          </span>
+         </dt>
+         <dt>
+          <span class="section">
+           <a href="#id2627765">
+            9.3. less
+           </a>
+          </span>
+         </dt>
+        </dl>
+       </dd>
+       <dt>
+        <span class="section">
+         <a href="#id2628006">
+          10. Directory Structure
+         </a>
+        </span>
+       </dt>
+       <dd>
+        <dl>
+         <dt>
+          <span class="section">
+           <a href="#id2628270">
+            10.1. man hier
+           </a>
+          </span>
+         </dt>
+         <dt>
+          <span class="section">
+           <a href="#id2628287">
+            10.2. ls -l
+           </a>
+          </span>
+         </dt>
+        </dl>
+       </dd>
+       <dt>
+        <span class="section">
+         <a href="#id2628310">
+          11. Permissions and Ownership
+         </a>
+        </span>
+       </dt>
+       <dd>
+        <dl>
+         <dt>
+          <span class="section">
+           <a href="#id2628319">
+            11.1. chmod
+           </a>
+          </span>
+         </dt>
+        </dl>
+       </dd>
+       <dt>
+        <span class="section">
+         <a href="#id2623759">
+          12. Redirection and Piping
+         </a>
+        </span>
+       </dt>
+       <dd>
+        <dl>
+         <dt>
+          <span class="section">
+           <a href="#id2629245">
+            12.1. Redirecting standard input and standard output
+           </a>
+          </span>
+         </dt>
+         <dt>
+          <span class="section">
+           <a href="#id2629314">
+            12.2. Piping
+           </a>
+          </span>
+         </dt>
+         <dt>
+          <span class="section">
+           <a href="#id2629376">
+            12.3. Redirecting to and from the standard file handles
+           </a>
+          </span>
+         </dt>
+         <dt>
+          <span class="section">
+           <a href="#id2629569">
+            12.4. Chained pipelines
+           </a>
+          </span>
+         </dt>
+         <dt>
+          <span class="section">
+           <a href="#id2629602">
+            12.5. Redirect to multiple outputs
+           </a>
+          </span>
+         </dt>
+        </dl>
+       </dd>
+       <dt>
+        <span class="section">
+         <a href="#id2629633">
+          13. More Text Processing
+         </a>
+        </span>
+       </dt>
+       <dd>
+        <dl>
+         <dt>
+          <span class="section">
+           <a href="#id2629642">
+            13.1. grep
+           </a>
+          </span>
+         </dt>
+         <dt>
+          <span class="section">
+           <a href="#id2629831">
+            13.2. tr
+           </a>
+          </span>
+         </dt>
+        </dl>
+       </dd>
+       <dt>
+        <span class="section">
+         <a href="#id2629978">
+          14. Elementary Regex
+         </a>
+        </span>
+       </dt>
+       <dd>
+        <dl>
+         <dt>
+          <span class="section">
+           <a href="#id2630180">
+            14.1. Lazy quantification
+           </a>
+          </span>
+         </dt>
+        </dl>
+       </dd>
+       <dt>
+        <span class="section">
+         <a href="#id2630255">
+          15. One Liners
+         </a>
+        </span>
+       </dt>
+      </dl>
+     </dd>
+    </dl>
+   </div>
+   <div class="article">
+    <div class="titlepage">
+     <div>
+      <div>
+       <h2 class="title" id="id2573418">
+       </h2>
+      </div>
+      <div>
+       <h2 class="title" id="id2573418">
+       </h2>
+      </div>
+     </div>
+     <hr />
+    </div>
+    <div class="toc">
+     <p>
+      <b>
+       Table of Contents
+      </b>
+     </p>
+     <dl>
+      <dt>
+       <span class="section">
+        <a href="#id2383509">
+         1. Introducing Linux
+        </a>
+       </span>
+      </dt>
+      <dd>
+       <dl>
+        <dt>
+         <span class="section">
+          <a href="#id2381179">
+           1.1. Historical Background
+          </a>
+         </span>
+        </dt>
+        <dt>
+         <span class="section">
+          <a href="#id2624471">
+           1.2. Design and Implications
+          </a>
+         </span>
+        </dt>
+        <dt>
+         <span class="section">
+          <a href="#id2624755">
+           1.3. Reasons for Using Linux
+          </a>
+         </span>
+        </dt>
+       </dl>
+      </dd>
+      <dt>
+       <span class="section">
+        <a href="#id2624896">
+         2. Getting Started
+        </a>
+       </span>
+      </dt>
+      <dd>
+       <dl>
+        <dt>
+         <span class="section">
+          <a href="#id2624904">
+           2.1. Logging in, activating the user interface and logging out
+          </a>
+         </span>
+        </dt>
+       </dl>
+      </dd>
+      <dt>
+       <span class="section">
+        <a href="#id2625184">
+         3. Basic Commands
+        </a>
+       </span>
+      </dt>
+      <dd>
+       <dl>
+        <dt>
+         <span class="section">
+          <a href="#id2625193">
+           3.1. ls
+          </a>
+         </span>
+        </dt>
+        <dt>
+         <span class="section">
+          <a href="#id2625356">
+           3.2. date
+          </a>
+         </span>
+        </dt>
+        <dt>
+         <span class="section">
+          <a href="#id2625416">
+           3.3. cd
+          </a>
+         </span>
+        </dt>
+        <dt>
+         <span class="section">
+          <a href="#id2625517">
+           3.4. who
+          </a>
+         </span>
+        </dt>
+        <dt>
+         <span class="section">
+          <a href="#id2625600">
+           3.5. mkdir
+          </a>
+         </span>
+        </dt>
+       </dl>
+      </dd>
+      <dt>
+       <span class="section">
+        <a href="#id2625768">
+         4. Getting Help
+        </a>
+       </span>
+      </dt>
+      <dd>
+       <dl>
+        <dt>
+         <span class="section">
+          <a href="#id2625776">
+           4.1. apropos and whatis
+          </a>
+         </span>
+        </dt>
+        <dt>
+         <span class="section">
+          <a href="#id2625871">
+           4.2. man
+          </a>
+         </span>
+        </dt>
+        <dt>
+         <span class="section">
+          <a href="#id2626065">
+           4.3. info
+          </a>
+         </span>
+        </dt>
+        <dt>
+         <span class="section">
+          <a href="#id2626152">
+           4.4. --help
+          </a>
+         </span>
+        </dt>
+       </dl>
+      </dd>
+      <dt>
+       <span class="section">
+        <a href="#id2626205">
+         5. Basic file handling
+        </a>
+       </span>
+      </dt>
+      <dd>
+       <dl>
+        <dt>
+         <span class="section">
+          <a href="#id2626214">
+           5.1. cp
+          </a>
+         </span>
+        </dt>
+        <dt>
+         <span class="section">
+          <a href="#id2626526">
+           5.2. mv
+          </a>
+         </span>
+        </dt>
+        <dt>
+         <span class="section">
+          <a href="#id2626659">
+           5.3. rm
+          </a>
+         </span>
+        </dt>
+       </dl>
+      </dd>
+      <dt>
+       <span class="section">
+        <a href="#id2626827">
+         6. Command Line Arguments
+        </a>
+       </span>
+      </dt>
+      <dt>
+       <span class="section">
+        <a href="#id2626920">
+         7. Basic Text Processing
+        </a>
+       </span>
+      </dt>
+      <dd>
+       <dl>
+        <dt>
+         <span class="section">
+          <a href="#id2626929">
+           7.1. head
+          </a>
+         </span>
+        </dt>
+        <dt>
+         <span class="section">
+          <a href="#id2627016">
+           7.2. tail
+          </a>
+         </span>
+        </dt>
+        <dt>
+         <span class="section">
+          <a href="#id2627144">
+           7.3. cut
+          </a>
+         </span>
+        </dt>
+        <dt>
+         <span class="section">
+          <a href="#id2627231">
+           7.4. paste
+          </a>
+         </span>
+        </dt>
+       </dl>
+      </dd>
+      <dt>
+       <span class="section">
+        <a href="#id2627351">
+         8. Shell Meta Characters
+        </a>
+       </span>
+      </dt>
+      <dt>
+       <span class="section">
+        <a href="#id2627457">
+         9. Looking At Files
+        </a>
+       </span>
+      </dt>
+      <dd>
+       <dl>
+        <dt>
+         <span class="section">
+          <a href="#id2627466">
+           9.1. cat
+          </a>
+         </span>
+        </dt>
+        <dt>
+         <span class="section">
+          <a href="#id2627654">
+           9.2. more
+          </a>
+         </span>
+        </dt>
+        <dt>
+         <span class="section">
+          <a href="#id2627765">
+           9.3. less
+          </a>
+         </span>
+        </dt>
+       </dl>
+      </dd>
+      <dt>
+       <span class="section">
+        <a href="#id2628006">
+         10. Directory Structure
+        </a>
+       </span>
+      </dt>
+      <dd>
+       <dl>
+        <dt>
+         <span class="section">
+          <a href="#id2628270">
+           10.1. man hier
+          </a>
+         </span>
+        </dt>
+        <dt>
+         <span class="section">
+          <a href="#id2628287">
+           10.2. ls -l
+          </a>
+         </span>
+        </dt>
+       </dl>
+      </dd>
+      <dt>
+       <span class="section">
+        <a href="#id2628310">
+         11. Permissions and Ownership
+        </a>
+       </span>
+      </dt>
+      <dd>
+       <dl>
+        <dt>
+         <span class="section">
+          <a href="#id2628319">
+           11.1. chmod
+          </a>
+         </span>
+        </dt>
+       </dl>
+      </dd>
+      <dt>
+       <span class="section">
+        <a href="#id2623759">
+         12. Redirection and Piping
+        </a>
+       </span>
+      </dt>
+      <dd>
+       <dl>
+        <dt>
+         <span class="section">
+          <a href="#id2629245">
+           12.1. Redirecting standard input and standard output
+          </a>
+         </span>
+        </dt>
+        <dt>
+         <span class="section">
+          <a href="#id2629314">
+           12.2. Piping
+          </a>
+         </span>
+        </dt>
+        <dt>
+         <span class="section">
+          <a href="#id2629376">
+           12.3. Redirecting to and from the standard file handles
+          </a>
+         </span>
+        </dt>
+        <dt>
+         <span class="section">
+          <a href="#id2629569">
+           12.4. Chained pipelines
+          </a>
+         </span>
+        </dt>
+        <dt>
+         <span class="section">
+          <a href="#id2629602">
+           12.5. Redirect to multiple outputs
+          </a>
+         </span>
+        </dt>
+       </dl>
+      </dd>
+      <dt>
+       <span class="section">
+        <a href="#id2629633">
+         13. More Text Processing
+        </a>
+       </span>
+      </dt>
+      <dd>
+       <dl>
+        <dt>
+         <span class="section">
+          <a href="#id2629642">
+           13.1. grep
+          </a>
+         </span>
+        </dt>
+        <dt>
+         <span class="section">
+          <a href="#id2629831">
+           13.2. tr
+          </a>
+         </span>
+        </dt>
+       </dl>
+      </dd>
+      <dt>
+       <span class="section">
+        <a href="#id2629978">
+         14. Elementary Regex
+        </a>
+       </span>
+      </dt>
+      <dd>
+       <dl>
+        <dt>
+         <span class="section">
+          <a href="#id2630180">
+           14.1. Lazy quantification
+          </a>
+         </span>
+        </dt>
+       </dl>
+      </dd>
+      <dt>
+       <span class="section">
+        <a href="#id2630255">
+         15. One Liners
+        </a>
+       </span>
+      </dt>
+     </dl>
+    </div>
+    <div class="section" title="1.Introducing Linux">
+     <div class="titlepage">
+      <div>
+       <div>
+        <h2 class="title" style="clear: both">
+         <a name="id2383509">
+         </a>
+         1.Introducing Linux
+        </h2>
+       </div>
+      </div>
+     </div>
+     <p id="ch9Using_Linux_Tools_1">
+      (Attribution : A significant chunk of the content under this section is based on data from Wikipedia and the Linux Documentation Project)
+     </p>
+     <p id="ch9Using_Linux_Tools_2">
+      Linux (usually pronounced lnks') is a generic term referring to Unix-like computer operating systems based on the Linux kernel, where a kernel is the intermediate layer between the hardware and the applications. The kernel is, on an abstract level, the core of (most) operating systems, that manages the various system resources. The development of the Linux OS is considered the basis for Free and Open Source Software (FOSS) collaboration since typically the underlying source code can be used, modified freely, and redistributed by anyone under the terms of the GNU (a recursive acronym for "GNU's Not Unix!") Global Public License (GPL) and other free software licences. This freedom to access and reuse various components of a system, is one of the primary reasons for the popularity of Linux.
+     </p>
+     <p id="ch9Using_Linux_Tools_3">
+      Linux is installed on a variety of computer hardware, that include mobile phones, embedded devices and supercomputers, but is infamous for its use in servers.
+     </p>
+     <p id="ch9Using_Linux_Tools_4">
+      The name "Linux"  comes from the Linux kernel, originally written in 1991 by Linus Torvalds. The rest of the system usually comprises components such as the Apache HTTP Server, the X Window System, the GNOME and KDE desktop environments, and utilities and libraries from the GNU Project (announced in 1983 by Richard Stallman). Commonly-used applications with desktop Linux systems include the Mozilla Firefox web-browser and the OpenOffice.org office application suite. The GNU contribution is the basis for the Free Software Foundation's preferred name GNU/Linux. The kernel's mascot is a penguin named "Tux". Mozilla Firefox and OpenOffice.org are open-source projects which can be run on most Operating Systems, including proprietary ones.
+     </p>
+     <div class="section" title="1.1.Historical Background">
+      <div class="titlepage">
+       <div>
+        <div>
+         <h3 class="title">
+          <a name="id2381179">
+          </a>
+          1.1.Historical Background
+         </h3>
+        </div>
+       </div>
+      </div>
+      <div class="section" title="1.1.1.Events leading to the creation">
+       <div class="titlepage">
+        <div>
+         <div>
+          <h4 class="title">
+           <a name="id2571908">
+           </a>
+           1.1.1.Events leading to the creation
+          </h4>
+         </div>
+        </div>
+       </div>
+       <div class="itemizedlist">
+        <ul class="itemizedlist" type="*">
+         <li class="listitem" style="list-style-type: *">
+          <p id="ch9Using_Linux_Tools_5">
+           The Unix operating system was developed in the 1960s and released for public use in 1970. Its accessibility and portability caused it to be widely adopted, copied and modified by academic institutions and businesses. Its design became influential to authors of other systems. Other free operating systems include the Berkeley Software Distribution (BSD), developed at the University of California at Berkeley, and MINIX which was released by Andrew S. Tanenbaum. The development and adoption of BSD and MINIX were limited due to various reasons, and this lack of a widely-adopted and free kernel triggered Linus Torvalds into starting his project.
+          </p>
+         </li>
+         <li class="listitem" style="list-style-type: *">
+          <p id="ch9Using_Linux_Tools_6">
+           In 1983, Richard Stallman started the GNU project with the goal of creating a free UNIX-like operating system. As part of this work, he wrote the GNU General Public License (GPL). By the early 1990s there was almost enough available software to create a full operating system. However, the GNU kernel, called Hurd, failed to attract enough attention from developers leaving GNU incomplete.
+          </p>
+         </li>
+        </ul>
+       </div>
+      </div>
+      <div class="section" title="1.1.2.The Creation of Linux">
+       <div class="titlepage">
+        <div>
+         <div>
+          <h4 class="title">
+           <a name="id2624436">
+           </a>
+           1.1.2.The Creation of Linux
+          </h4>
+         </div>
+        </div>
+       </div>
+       <p id="ch9Using_Linux_Tools_7">
+        In 1991, Linus Torvalds began a project at the University of Helsinki that later became the Linux kernel. It was initially a terminal (command-line) emulator, which Torvalds used to access the large UNIX servers of the university. He wrote the program targeting just the hardware he was using and independent of an operating system because he wanted to use the functions of his computer with an 80386 processor. Development was done on Minix using the GNU C compiler. This application is still the main choice for compiling Linux today (although the code can be built with other compilers, such as the Intel C Compiler).
+       </p>
+       <p id="ch9Using_Linux_Tools_8">
+        Torvalds continues to direct the development of the kernel. Stallman heads the Free Software Foundation, which in turn supports the GNU components. Finally, individuals and corporations develop third-party non-GNU components, which constitute a vast body of work and including kernel modules, and user applications and libraries. Linux vendors and communities combine and distribute the kernel, GNU components, and non-GNU components, with additional package management software in the form of Linux distributions.
+       </p>
+      </div>
+     </div>
+     <div class="section" title="1.2.Design and Implications">
+      <div class="titlepage">
+       <div>
+        <div>
+         <h3 class="title">
+          <a name="id2624471">
+          </a>
+          1.2.Design and Implications
+         </h3>
+        </div>
+       </div>
+      </div>
+      <p id="ch9Using_Linux_Tools_9">
+       A Linux-based system is a modular Unix-like operating system, deriving much of its basic design from principles established in Unix earlier. Such a system uses a monolithic kernel, called the Linux kernel, which handles process control, networking, and peripheral and file system access. Device drivers are integrated directly with the kernel. Separate projects that interface with the kernel provide much of the system's higher-level functionality. The GNU userland is an important part of most Linux-based systems, providing the most common implementation of the C library, a popular shell, and many of the common Unix tools which carry out many basic operating system tasks. The graphical user interface (or GUI) used by most Linux systems is based on the "X Window System".
+      </p>
+      <div class="section" title="1.2.1.User Interface">
+       <div class="titlepage">
+        <div>
+         <div>
+          <h4 class="title">
+           <a name="id2624496">
+           </a>
+           1.2.1.User Interface
+          </h4>
+         </div>
+        </div>
+       </div>
+       <p id="ch9Using_Linux_Tools_a">
+        Users can control a Linux-based system through a command line interface (or CLI), a graphical user interface (or GUI), or through controls attached to the associated hardware (this is common for embedded systems). For desktop systems, the default mode is usually the GUI. On desktop machines, "KDE", "GNOME" and "Xfce" are the most popular user interfaces,though a variety of additional user interfaces exist. Most popular user interfaces run on top of the "X Window System" (or X), which enables a graphical application running on one machine to be displayed and controlled from another in a network.
+       </p>
+       <p id="ch9Using_Linux_Tools_b">
+        A Linux system also provides a CLI of some sort through a shell, which is the traditional way of interacting with a Unix system. A Linux distribution specialized for servers may use the CLI as its only interface. A headless system (system run without even a monitor) can be controlled by the command line via a remote-control protocol such as SSH or telnet. The CLI is particularly suited for automation of repetitive or delayed tasks, and provides very simple inter-process communication. A graphical terminal emulator program is often used to access the CLI from a Linux desktop.
+       </p>
+      </div>
+      <div class="section" title="1.2.2.Development">
+       <div class="titlepage">
+        <div>
+         <div>
+          <h4 class="title">
+           <a name="id2624550">
+           </a>
+           1.2.2.Development
+          </h4>
+         </div>
+        </div>
+       </div>
+       <p id="ch9Using_Linux_Tools_c">
+        The primary difference between Linux and many other popular contemporary operating systems is that the Linux kernel and other components are free and open source software. Linux is not the only such operating system, although it is by far the most widely used. Some free and open source software licenses are based on the principle of "copyleft", a kind of reciprocity: any work derived from a copyleft piece of software must also be copyleft itself. The most common free software license, the GNU GPL, is a form of copyleft, and is used for the Linux kernel and many of the components from the GNU project.
+       </p>
+       <p id="ch9Using_Linux_Tools_d">
+        Linux based distributions are intended by developers for interoperability with other operating systems and established computing standards. Linux systems adhere to POSIX, SUS, ISO and ANSI standards where possible, although to date only one Linux distribution has been POSIX.1 certified, Linux-FT.Free software projects, although developed in a collaborative fashion, are often produced independently of each other. The fact that the software licenses explicitly permit redistribution, however, provides a basis for larger scale projects that collect the software produced by stand-alone projects and make it available all at once in the form of a Linux distribution.
+       </p>
+       <p id="ch9Using_Linux_Tools_e">
+        A Linux distribution, commonly called a "distro", is a project that manages a remote collection of system software and application software packages available for download and installation through a network connection. This allows the user to adapt the operating system to his/her specific needs. Distributions are maintained by individuals, loose-knit teams, volunteer organizations, and commercial entities. A distribution can be installed using a CD that contains distribution-specific software for initial system installation and configuration. A package manager such as Synaptic or YAST allows later package upgrades and installations. A distribution is responsible for the default configuration of the installed Linux kernel, general system security, and more generally integration of the different software packages into a coherent whole.
+       </p>
+      </div>
+      <div class="section" title="1.2.3.Community">
+       <div class="titlepage">
+        <div>
+         <div>
+          <h4 class="title">
+           <a name="id2624617">
+           </a>
+           1.2.3.Community
+          </h4>
+         </div>
+        </div>
+       </div>
+       <p id="ch9Using_Linux_Tools_f">
+        A distribution is largely driven by its developer and user communities. Some vendors develop and fund their distributions on a volunteer basis. Examples include Debian and the Debian-based, Ubuntu. Others maintain a community version of their commercial distributions, as Red Hat does with Fedora.
+       </p>
+       <p id="ch9Using_Linux_Tools_10">
+        In many cities and regions, local associations known as Linux Users Groups (LUGs) seek to promote their preferred distribution and by extension free software. They hold meetings and provide free demonstrations, training, technical support, and operating system installation to new users. Many Internet communities also provide support to Linux users and developers. Most distributions and free software / open source projects have IRC (Internet Relay Chat) chatrooms or newsgroups. Online forums are another means for support. Linux distributions host mailing lists; commonly there will be a specific topic such as usage or development for a given list. All these can be found simply by running an appropriate search on Google.
+       </p>
+       <p id="ch9Using_Linux_Tools_11">
+        Although Linux distributions are generally available without charge, several large corporations sell, support, and contribute to the development of the components of the system and of free software. These include Dell, IBM, HP, Oracle, Sun Microsystems, Novell, Nokia. A number of corporations, notably Red Hat, have built their entire business around Linux distributions.
+       </p>
+      </div>
+      <div class="section" title="1.2.4.Can I make a profit out of running a business involving Linux?">
+       <div class="titlepage">
+        <div>
+         <div>
+          <h4 class="title">
+           <a name="id2624662">
+           </a>
+           1.2.4.Can I make a profit out of running a business involving Linux?
+          </h4>
+         </div>
+        </div>
+       </div>
+       <p id="ch9Using_Linux_Tools_12">
+        The answer is, "Yes!". The free software licenses, on which the various software packages of a distribution built on the Linux kernel are based, explicitly accommodate and encourage commercialization; the relationship between a Linux distribution as a whole and individual vendors may be seen as symbiotic. One common business model of commercial suppliers is charging for support, especially for business users. A number of companies also offer a specialized business version of their distribution, which adds proprietary support packages and tools to administer higher numbers of installations or to simplify administrative tasks. Another business model is to give away the software in order to sell hardware. Examples of corporations that are extensively (and sometimes exclusively) open-source and Linux-powered , with successful revenue generation models involving these, are Google, SUN, Mozilla, etc.
+       </p>
+      </div>
+      <div class="section" title="1.2.5.Programming on Linux">
+       <div class="titlepage">
+        <div>
+         <div>
+          <h4 class="title">
+           <a name="id2624708">
+           </a>
+           1.2.5.Programming on Linux
+          </h4>
+         </div>
+        </div>
+       </div>
+       <p id="ch9Using_Linux_Tools_13">
+        Most Linux distributions support dozens of programming languages. The most common collection of utilities for building both Linux applications and operating system programs is found within the GNU toolchain, which includes the GNU Compiler Collection (GCC) and the GNU build system. Amongst others, GCC provides compilers for Ada, C, C++, Java, and Fortran. The Linux kernel itself is written to be compiled with GCC. Proprietary compilers for Linux include the Intel C++ Compiler, Sun Studio, and IBM XL C/C++ Compiler.
+       </p>
+       <p id="ch9Using_Linux_Tools_14">
+        Most distributions also include support for PHP, Perl, Ruby, Python and other dynamic languages. Examples of languages that are less common, but still supported, are C# via the Mono project, sponsored by Novell, and Scheme. A number of Java Virtual Machines and development kits run on Linux, including the original Sun Microsystems JVM (HotSpot), and IBM's J2SE RE, as well as many open-source projects like Kaffe.
+       </p>
+       <p id="ch9Using_Linux_Tools_15">
+        The two main frameworks for developing graphical applications are those of GNOME and KDE. These projects are based on the GTK+ and Qt widget toolkits, respectively, which can also be used independently of the larger framework. Both support a wide variety of languages. There are a number of Integrated Development Environments (IDEs) available including Anjuta, Code::Blocks, Eclipse, KDevelop, Lazarus, MonoDevelop, NetBeans, and Omnis Studio while the long-established editors Vim and Emacs remain popular.
+       </p>
+      </div>
+     </div>
+     <div class="section" title="1.3.Reasons for Using Linux">
+      <div class="titlepage">
+       <div>
+        <div>
+         <h3 class="title">
+          <a name="id2624755">
+          </a>
+          1.3.Reasons for Using Linux
+         </h3>
+        </div>
+       </div>
+      </div>
+      <div class="itemizedlist">
+       <ul class="itemizedlist" type="*">
+        <li class="listitem" style="list-style-type: *">
+         <p id="ch9Using_Linux_Tools_16">
+          Linux is free:
+         </p>
+        </li>
+       </ul>
+      </div>
+      <p id="ch9Using_Linux_Tools_17">
+       As in "free beer". Linux can be downloaded in its entirety from the Internet completely for free. No registration fees, no costs per user, free updates, and freely available source code in case you want to change the behavior of your system.
 Most of all, Linux is free as in "free speech":
-The license commonly used is the GNU Public License (GPL). The license says that anybody who may want to do so, has the right to change Linux and eventually to redistribute a changed version, on the one condition that the code is still available after redistribution. In practice, you are free to grab a kernel image and sell the new code, as long as your customers can still have a copy of that code.</p>
-<div class="itemizedlist"><ul class="itemizedlist" type="*"><li class="listitem" style="list-style-type: *"><p><a name="ch9Using_Linux_Tools_18"></a>Linux is portable to any hardware platform:</p></li></ul></div>
-<p><a name="ch9Using_Linux_Tools_19"></a>A vendor, who wants to sell a new type of computer and who does not know what kind of OS his/her new machine will run, can take a Linux kernel and make it work on his/her hardware, because documentation related to this activity is freely available.</p>
-<div class="itemizedlist"><ul class="itemizedlist" type="*"><li class="listitem" style="list-style-type: *"><p><a name="ch9Using_Linux_Tools_1a"></a>Linux was made to keep on running:</p></li></ul></div>
-<p><a name="ch9Using_Linux_Tools_1b"></a>As with UNIX, a Linux system expects to run without rebooting all the time. That is why a lot of tasks are being executed at night or scheduled automatically for other times, resulting in higher availability during busier periods and a more balanced use of the hardware. This property allows for Linux to be applicable to environments where people do not have the time or the possibility to control their systems constantly.</p>
-<div class="itemizedlist"><ul class="itemizedlist" type="*"><li class="listitem" style="list-style-type: *"><p><a name="ch9Using_Linux_Tools_1c"></a>Linux is secure and versatile:</p></li></ul></div>
-<p><a name="ch9Using_Linux_Tools_1d"></a>The security model used in Linux is based on the UNIX idea of security, which is known to be robust and of proven quality. But Linux is not only safe from attacks from the Internet: it will adapt equally to other situations, utilizing the same high standards for security.</p>
-<div class="itemizedlist"><ul class="itemizedlist" type="*"><li class="listitem" style="list-style-type: *"><p><a name="ch9Using_Linux_Tools_1e"></a>Linux is scalable:</p></li></ul></div>
-<p><a name="ch9Using_Linux_Tools_1f"></a>From a Palmtop with 2 MB of memory to a petabyte storage cluster with hundreds of nodes: add or remove the appropriate packages and Linux fits all. One does not need a supercomputer anymore,because you can use Linux to do big things using the building blocks provided with the system. If one wants to do little things, such as making an operating system for an embedded processor or just recycling your old 486, Linux will do that as well.</p>
-<div class="itemizedlist"><ul class="itemizedlist" type="*"><li class="listitem" style="list-style-type: *"><p><a name="ch9Using_Linux_Tools_20"></a>The Linux OS and Linux applications have very short debug−times:</p></li></ul></div>
-<p><a name="ch9Using_Linux_Tools_21"></a>Because Linux has been developed and tested by thousands of people, both errors and people to fix them are found very quickly. It often happens that there are only a couple of hours between discovery and fixing of a bug.</p>
-</div>
-</div>
-<div class="section" title="2. Getting Started">
-<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="id2946227"></a>2. Getting Started</h2></div></div></div>
-<div class="section" title="2.1. Logging in, activating the user interface and logging out">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="id2946236"></a>2.1. Logging in, activating the user interface and logging out</h3></div></div></div>
-<p><a name="ch9Using_Linux_Tools_22"></a>In order to work on a Linux system directly, one needs to provide a user name and password. You always need to authenticate to the system. Most PC−based Linux systems have two basic modes for a system to run in: either quick and clean in text console mode,which includes with mouse, multitasking and multi−user features, or in graphical console mode, which looks better but eats more system resources.</p>
-<div class="section" title="2.1.1. Graphical Mode">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="id2946266"></a>2.1.1. Graphical Mode</h4></div></div></div>
-<p><a name="ch9Using_Linux_Tools_23"></a>This is the default nowadays on most desktop computers. You know you will be connecting to the system using graphical mode when you are first asked for your user name, and then to type your password.</p>
-<p><a name="ch9Using_Linux_Tools_24"></a>To log in, make sure the mouse pointer is in the login window, provide your user name and password to the system and click <span class="emphasis"><em>OK</em></span> or press <span class="emphasis"><em>Enter</em></span>.
-It is generally considered a bad idea to connect (graphically) using the root user name, the system adminstrator's account, since the use of graphics includes running a lot of extra programs, in root's case with a lot of extra permissions. To keep all risks as low as possible, use a normal user account to connect graphically. But there are enough risks to keep this in mind as a general advice, for all use of the root account: only log in as root when extra privileges are required.</p>
-<p><a name="ch9Using_Linux_Tools_25"></a>After entering your user name/password combination, it can take a little while before the graphical environment is started, depending on the CPU speed of your computer, on the software you use and on your personal settings.</p>
-<p><a name="ch9Using_Linux_Tools_26"></a>To continue, you will need to open a <span class="emphasis"><em>terminal window</em></span> or <span class="emphasis"><em>xterm</em></span> for short (X being the name for the underlying software supporting the graphical environment). This program can be found in the <span class="emphasis"><em>Applications−&gt;Utilities-&gt;System Tools</em></span> or <span class="emphasis"><em>Internet menu</em></span>, depending on what window manager you are using. There might be icons that you can use as a shortcut to get an <span class="emphasis"><em>xterm</em></span> window as well, and clicking the right mouse button on the desktop background will usually present you with a menu containing a terminal window application.</p>
-<p><a name="ch9Using_Linux_Tools_27"></a>While browsing the menus, you will notice that a lot of things can be done without entering commands via the keyboard. For most users, the good old point−n−click method of dealing with the computer will do. But for those who want to enter the "heart" of the system, a tool stronger than a mouse will be required to handle the various tasks. This tool is the shell, and when in graphical mode, we activate our shell by opening a terminal window.</p>
-<p><a name="ch9Using_Linux_Tools_28"></a>A terminal window should always show a command prompt when you open one. This terminal shows a standard prompt, which displays the user's login name, and the current working directory, represented by the twiddle (~)</p>
-<p><a name="ch9Using_Linux_Tools_29"></a>Another common form for a prompt is this one:
-[</p>
-<div class="reference">
-<div class="titlepage"><hr></div>user@host</div>
-<p> dir]</p>
-<p><a name="ch9Using_Linux_Tools_2a"></a>In the above example, <span class="emphasis"><em>user</em></span> will be your login name, <span class="emphasis"><em>hosts</em></span> the name of the machine you are working on, and <span class="emphasis"><em>dir</em></span> an indication of your current location in the file system. Prompts can display all kinds of information, but they are not part of the commands you are giving to your system. To disconnect from the system in graphical mode, you need to close all terminal windows and other applications. After that, hit the <span class="emphasis"><em>logout</em></span> icon or find <span class="emphasis"><em>Log Out</em></span> in the menu. Closing everything is not really necessary, and the system can do this for you, but session management might put all currently open applications back on your screen when you connect again, which takes longer and is not always the desired effect. However, this behavior is configurable.</p>
-<p><a name="ch9Using_Linux_Tools_2b"></a>When you see the login screen again, asking to enter user name and password, logout was successful.</p>
-</div>
-<div class="section" title="2.1.2. Text Mode">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="id2946426"></a>2.1.2. Text Mode</h4></div></div></div>
-<p><a name="ch9Using_Linux_Tools_2c"></a>One is in text mode when the whole screen is black, showing (in most cases white) characters. A text mode login screen typically shows some information about the machine you are working on, the name of the machine and a prompt waiting for you to log in.</p>
-<p><a name="ch9Using_Linux_Tools_2d"></a>The login is different from a graphical login, in that you have to hit the <span class="emphasis"><em>Enter</em></span> key after providing your user name, because there are no buttons on the screen that you can click with the mouse. Then you should type your password, followed by another <span class="emphasis"><em>Enter</em></span>. You will not see any indication that you are entering something, not even an asterisk, and you won't see the cursor move. But this is normal on Linux and is done for security
-reasons.</p>
-<p><a name="ch9Using_Linux_Tools_2e"></a>When the system has accepted you as a valid user, you may get some more information, called the <span class="emphasis"><em>message of the day</em></span>, which can be anything. Additionally, it is popular on UNIX systems to display a fortune cookie, which contains some general wise or unwise (this is up to you) thoughts. After that, you will be given a shell, indicated with the same prompt that you would get in graphical mode.</p>
-<p><a name="ch9Using_Linux_Tools_2f"></a>Also in text mode: log in as root only to do setup and configuration that absolutely requires administrator privileges, such as adding users, installing software packages, and performing network and other system configuration. Once you are finished, immediately leave the special account and resume your work as a non−privileged user.</p>
-<p><a name="ch9Using_Linux_Tools_30"></a>Logging out is done by entering the <span class="emphasis"><em>logout</em></span> command, followed by Enter. You are successfully disconnected from the system when you see the login screen again.Don't power−off the computer after logging out. It is not meant to be shut off without application of the proper procedures for halting the system. Powering it off without going through the halting process might cause severe damage!</p>
-</div>
-</div>
-</div>
-<div class="section" title="3. Basic Commands">
-<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="id2946515"></a>3. Basic Commands</h2></div></div></div>
-<div class="section" title="3.1. ls">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="id2946524"></a>3.1. ls</h3></div></div></div>
-<p><a name="ch9Using_Linux_Tools_31"></a>When invoked without any arguments, <span class="emphasis"><em>ls</em></span> lists the files in the current working directory. A directory that is not the current working directory can be specified and ls will list the files there. The user also may specify any list of files and directories. In this case, all files and all contents of specified directories will be listed. The name <span class="emphasis"><em>ls</em></span> is derived from <span class="emphasis"><em>list segments</em></span> which was used in earlier systems.</p>
-<p><a name="ch9Using_Linux_Tools_32"></a>Files whose names start with "." are not listed, unless the <span class="emphasis"><em>-a</em></span> flag is specified or the files are specified explicitly.</p>
-<p><a name="ch9Using_Linux_Tools_33"></a>Without options, <span class="emphasis"><em>ls</em></span> displays files in a bare format. This bare format however makes it difficult to establish the type, permissions, and size of the files. The most common options to reveal this information or change the list of files are:</p>
-<div class="itemizedlist"><ul class="itemizedlist" type="*">
-<li class="listitem" style="list-style-type: *"><p><a name="ch9Using_Linux_Tools_34"></a><span class="emphasis"><em>-l</em></span> long format, displaying Unix file types, permissions, number of hard links, owner, group, size, date, and filename</p></li>
-<li class="listitem" style="list-style-type: *"><p><a name="ch9Using_Linux_Tools_35"></a><span class="emphasis"><em>-F</em></span> appends a character revealing the nature of a file, for example, * for an executable, or / for a directory. Regular files have no suffix.</p></li>
-<li class="listitem" style="list-style-type: *"><p><a name="ch9Using_Linux_Tools_36"></a><span class="emphasis"><em>-a</em></span> lists all files in the given directory, including those whose names start with "." (which are hidden files in Unix). By default, these files are excluded from the list.</p></li>
-<li class="listitem" style="list-style-type: *"><p><a name="ch9Using_Linux_Tools_37"></a><span class="emphasis"><em>-R</em></span> recursively lists subdirectories. The command ls -R / would therefore list all files.</p></li>
-<li class="listitem" style="list-style-type: *"><p><a name="ch9Using_Linux_Tools_38"></a><span class="emphasis"><em>-d</em></span> shows information about a symbolic link or directory, rather than about the link's target or listing the contents of a directory.</p></li>
-<li class="listitem" style="list-style-type: *"><p><a name="ch9Using_Linux_Tools_39"></a><span class="emphasis"><em>-t</em></span> sort the list of files by modification time.</p></li>
-<li class="listitem" style="list-style-type: *"><p><a name="ch9Using_Linux_Tools_3a"></a><span class="emphasis"><em>-h</em></span> print sizes in human readable format. (e.g., 1K, 234M, 2G, etc.)</p></li>
-</ul></div>
-<p><a name="ch9Using_Linux_Tools_3b"></a>In some environments, providing the option <span class="emphasis"><em>--color</em></span> (for GNU ls) or <span class="emphasis"><em>-G</em></span> (FreeBSD ls) causes ls to highlight different types of files with different colors, instead of with characters as <span class="emphasis"><em>-F</em></span> would. To determine what color to use for a file, GNU <span class="emphasis"><em>ls</em></span> checks the Unix file type, the file permissions, and the file extension, while FreeBSD <span class="emphasis"><em>ls</em></span> checks only the Unix file type and file permissions.:</p>
-<pre class="programlisting">
-$ ls
+The license commonly used is the GNU Public License (GPL). The license says that anybody who may want to do so, has the right to change Linux and eventually to redistribute a changed version, on the one condition that the code is still available after redistribution. In practice, you are free to grab a kernel image and sell the new code, as long as your customers can still have a copy of that code.
+      </p>
+      <div class="itemizedlist">
+       <ul class="itemizedlist" type="*">
+        <li class="listitem" style="list-style-type: *">
+         <p id="ch9Using_Linux_Tools_18">
+          Linux is portable to any hardware platform:
+         </p>
+        </li>
+       </ul>
+      </div>
+      <p id="ch9Using_Linux_Tools_19">
+       A vendor, who wants to sell a new type of computer and who does not know what kind of OS his/her new machine will run, can take a Linux kernel and make it work on his/her hardware, because documentation related to this activity is freely available.
+      </p>
+      <div class="itemizedlist">
+       <ul class="itemizedlist" type="*">
+        <li class="listitem" style="list-style-type: *">
+         <p id="ch9Using_Linux_Tools_1a">
+          Linux was made to keep on running:
+         </p>
+        </li>
+       </ul>
+      </div>
+      <p id="ch9Using_Linux_Tools_1b">
+       As with UNIX, a Linux system expects to run without rebooting all the time. That is why a lot of tasks are being executed at night or scheduled automatically for other times, resulting in higher availability during busier periods and a more balanced use of the hardware. This property allows for Linux to be applicable to environments where people do not have the time or the possibility to control their systems constantly.
+      </p>
+      <div class="itemizedlist">
+       <ul class="itemizedlist" type="*">
+        <li class="listitem" style="list-style-type: *">
+         <p id="ch9Using_Linux_Tools_1c">
+          Linux is secure and versatile:
+         </p>
+        </li>
+       </ul>
+      </div>
+      <p id="ch9Using_Linux_Tools_1d">
+       The security model used in Linux is based on the UNIX idea of security, which is known to be robust and of proven quality. But Linux is not only safe from attacks from the Internet: it will adapt equally to other situations, utilizing the same high standards for security.
+      </p>
+      <div class="itemizedlist">
+       <ul class="itemizedlist" type="*">
+        <li class="listitem" style="list-style-type: *">
+         <p id="ch9Using_Linux_Tools_1e">
+          Linux is scalable:
+         </p>
+        </li>
+       </ul>
+      </div>
+      <p id="ch9Using_Linux_Tools_1f">
+       From a Palmtop with 2 MB of memory to a petabyte storage cluster with hundreds of nodes: add or remove the appropriate packages and Linux fits all. One does not need a supercomputer anymore,because you can use Linux to do big things using the building blocks provided with the system. If one wants to do little things, such as making an operating system for an embedded processor or just recycling your old 486, Linux will do that as well.
+      </p>
+      <div class="itemizedlist">
+       <ul class="itemizedlist" type="*">
+        <li class="listitem" style="list-style-type: *">
+         <p id="ch9Using_Linux_Tools_20">
+          The Linux OS and Linux applications have very short debugtimes:
+         </p>
+        </li>
+       </ul>
+      </div>
+      <p id="ch9Using_Linux_Tools_21">
+       Because Linux has been developed and tested by thousands of people, both errors and people to fix them are found very quickly. It often happens that there are only a couple of hours between discovery and fixing of a bug.
+      </p>
+     </div>
+    </div>
+    <div class="section" title="2.Getting Started">
+     <div class="titlepage">
+      <div>
+       <div>
+        <h2 class="title" style="clear: both">
+         <a name="id2624896">
+         </a>
+         2.Getting Started
+        </h2>
+       </div>
+      </div>
+     </div>
+     <div class="section" title="2.1.Logging in, activating the user interface and logging out">
+      <div class="titlepage">
+       <div>
+        <div>
+         <h3 class="title">
+          <a name="id2624904">
+          </a>
+          2.1.Logging in, activating the user interface and logging out
+         </h3>
+        </div>
+       </div>
+      </div>
+      <p id="ch9Using_Linux_Tools_22">
+       In order to work on a Linux system directly, one needs to provide a user name and password. You always need to authenticate to the system. Most PCbased Linux systems have two basic modes for a system to run in: either quick and clean in text console mode,which includes with mouse, multitasking and multiuser features, or in graphical console mode, which looks better but eats more system resources.
+      </p>
+      <div class="section" title="2.1.1.Graphical Mode">
+       <div class="titlepage">
+        <div>
+         <div>
+          <h4 class="title">
+           <a name="id2624935">
+           </a>
+           2.1.1.Graphical Mode
+          </h4>
+         </div>
+        </div>
+       </div>
+       <p id="ch9Using_Linux_Tools_23">
+        This is the default nowadays on most desktop computers. You know you will be connecting to the system using graphical mode when you are first asked for your user name, and then to type your password.
+       </p>
+       <p id="ch9Using_Linux_Tools_24">
+        To log in, make sure the mouse pointer is in the login window, provide your user name and password to the system and click
+        <span class="emphasis">
+         <em>
+          OK
+         </em>
+        </span>
+        or press
+        <span class="emphasis">
+         <em>
+          Enter
+         </em>
+        </span>
+        .
+It is generally considered a bad idea to connect (graphically) using the root user name, the system adminstrator's account, since the use of graphics includes running a lot of extra programs, in root's case with a lot of extra permissions. To keep all risks as low as possible, use a normal user account to connect graphically. But there are enough risks to keep this in mind as a general advice, for all use of the root account: only log in as root when extra privileges are required.
+       </p>
+       <p id="ch9Using_Linux_Tools_25">
+        After entering your user name/password combination, it can take a little while before the graphical environment is started, depending on the CPU speed of your computer, on the software you use and on your personal settings.
+       </p>
+       <p id="ch9Using_Linux_Tools_26">
+        To continue, you will need to open a
+        <span class="emphasis">
+         <em>
+          terminal window
+         </em>
+        </span>
+        or
+        <span class="emphasis">
+         <em>
+          xterm
+         </em>
+        </span>
+        for short (X being the name for the underlying software supporting the graphical environment). This program can be found in the
+        <span class="emphasis">
+         <em>
+          Applications&gt;Utilities-&gt;System Tools
+         </em>
+        </span>
+        or
+        <span class="emphasis">
+         <em>
+          Internet menu
+         </em>
+        </span>
+        , depending on what window manager you are using. There might be icons that you can use as a shortcut to get an
+        <span class="emphasis">
+         <em>
+          xterm
+         </em>
+        </span>
+        window as well, and clicking the right mouse button on the desktop background will usually present you with a menu containing a terminal window application.
+       </p>
+       <p id="ch9Using_Linux_Tools_27">
+        While browsing the menus, you will notice that a lot of things can be done without entering commands via the keyboard. For most users, the good old pointnclick method of dealing with the computer will do. But for those who want to enter the "heart" of the system, a tool stronger than a mouse will be required to handle the various tasks. This tool is the shell, and when in graphical mode, we activate our shell by opening a terminal window.
+       </p>
+       <p id="ch9Using_Linux_Tools_28">
+        A terminal window should always show a command prompt when you open one. This terminal shows a standard prompt, which displays the user's login name, and the current working directory, represented by the twiddle (~)
+       </p>
+       <p id="ch9Using_Linux_Tools_29">
+        Another common form for a prompt is this one:
+[
+       </p>
+       <div class="reference">
+        <div class="titlepage">
+         <hr />
+        </div>
+        user@host
+       </div>
+       <p>
+        dir]
+       </p>
+       <p id="ch9Using_Linux_Tools_2a">
+        In the above example,
+        <span class="emphasis">
+         <em>
+          user
+         </em>
+        </span>
+        will be your login name,
+        <span class="emphasis">
+         <em>
+          hosts
+         </em>
+        </span>
+        the name of the machine you are working on, and
+        <span class="emphasis">
+         <em>
+          dir
+         </em>
+        </span>
+        an indication of your current location in the file system. Prompts can display all kinds of information, but they are not part of the commands you are giving to your system. To disconnect from the system in graphical mode, you need to close all terminal windows and other applications. After that, hit the
+        <span class="emphasis">
+         <em>
+          logout
+         </em>
+        </span>
+        icon or find
+        <span class="emphasis">
+         <em>
+          Log Out
+         </em>
+        </span>
+        in the menu. Closing everything is not really necessary, and the system can do this for you, but session management might put all currently open applications back on your screen when you connect again, which takes longer and is not always the desired effect. However, this behavior is configurable.
+       </p>
+       <p id="ch9Using_Linux_Tools_2b">
+        When you see the login screen again, asking to enter user name and password, logout was successful.
+       </p>
+      </div>
+      <div class="section" title="2.1.2.Text Mode">
+       <div class="titlepage">
+        <div>
+         <div>
+          <h4 class="title">
+           <a name="id2625094">
+           </a>
+           2.1.2.Text Mode
+          </h4>
+         </div>
+        </div>
+       </div>
+       <p id="ch9Using_Linux_Tools_2c">
+        One is in text mode when the whole screen is black, showing (in most cases white) characters. A text mode login screen typically shows some information about the machine you are working on, the name of the machine and a prompt waiting for you to log in.
+       </p>
+       <p id="ch9Using_Linux_Tools_2d">
+        The login is different from a graphical login, in that you have to hit the
+        <span class="emphasis">
+         <em>
+          Enter
+         </em>
+        </span>
+        key after providing your user name, because there are no buttons on the screen that you can click with the mouse. Then you should type your password, followed by another
+        <span class="emphasis">
+         <em>
+          Enter
+         </em>
+        </span>
+        . You will not see any indication that you are entering something, not even an asterisk, and you won't see the cursor move. But this is normal on Linux and is done for security
+reasons.
+       </p>
+       <p id="ch9Using_Linux_Tools_2e">
+        When the system has accepted you as a valid user, you may get some more information, called the
+        <span class="emphasis">
+         <em>
+          message of the day
+         </em>
+        </span>
+        , which can be anything. Additionally, it is popular on UNIX systems to display a fortune cookie, which contains some general wise or unwise (this is up to you) thoughts. After that, you will be given a shell, indicated with the same prompt that you would get in graphical mode.
+       </p>
+       <p id="ch9Using_Linux_Tools_2f">
+        Also in text mode: log in as root only to do setup and configuration that absolutely requires administrator privileges, such as adding users, installing software packages, and performing network and other system configuration. Once you are finished, immediately leave the special account and resume your work as a nonprivileged user.
+       </p>
+       <p id="ch9Using_Linux_Tools_30">
+        Logging out is done by entering the
+        <span class="emphasis">
+         <em>
+          logout
+         </em>
+        </span>
+        command, followed by Enter. You are successfully disconnected from the system when you see the login screen again.Don't poweroff the computer after logging out. It is not meant to be shut off without application of the proper procedures for halting the system. Powering it off without going through the halting process might cause severe damage!
+       </p>
+      </div>
+     </div>
+    </div>
+    <div class="section" title="3.Basic Commands">
+     <div class="titlepage">
+      <div>
+       <div>
+        <h2 class="title" style="clear: both">
+         <a name="id2625184">
+         </a>
+         3.Basic Commands
+        </h2>
+       </div>
+      </div>
+     </div>
+     <div class="section" title="3.1.ls">
+      <div class="titlepage">
+       <div>
+        <div>
+         <h3 class="title">
+          <a name="id2625193">
+          </a>
+          3.1.ls
+         </h3>
+        </div>
+       </div>
+      </div>
+      <p id="ch9Using_Linux_Tools_31">
+       When invoked without any arguments,
+       <span class="emphasis">
+        <em>
+         ls
+        </em>
+       </span>
+       lists the files in the current working directory. A directory that is not the current working directory can be specified and ls will list the files there. The user also may specify any list of files and directories. In this case, all files and all contents of specified directories will be listed. The name
+       <span class="emphasis">
+        <em>
+         ls
+        </em>
+       </span>
+       is derived from
+       <span class="emphasis">
+        <em>
+         list segments
+        </em>
+       </span>
+       which was used in earlier systems.
+      </p>
+      <p id="ch9Using_Linux_Tools_32">
+       Files whose names start with "." are not listed, unless the
+       <span class="emphasis">
+        <em>
+         -a
+        </em>
+       </span>
+       flag is specified or the files are specified explicitly.
+      </p>
+      <p id="ch9Using_Linux_Tools_33">
+       Without options,
+       <span class="emphasis">
+        <em>
+         ls
+        </em>
+       </span>
+       displays files in a bare format. This bare format however makes it difficult to establish the type, permissions, and size of the files. The most common options to reveal this information or change the list of files are:
+      </p>
+      <div class="itemizedlist">
+       <ul class="itemizedlist" type="*">
+        <li class="listitem" style="list-style-type: *">
+         <p id="ch9Using_Linux_Tools_34">
+          <span class="emphasis">
+           <em>
+            -l
+           </em>
+          </span>
+          long format, displaying Unix file types, permissions, number of hard links, owner, group, size, date, and filename
+         </p>
+        </li>
+        <li class="listitem" style="list-style-type: *">
+         <p id="ch9Using_Linux_Tools_35">
+          <span class="emphasis">
+           <em>
+            -F
+           </em>
+          </span>
+          appends a character revealing the nature of a file, for example, * for an executable, or / for a directory. Regular files have no suffix.
+         </p>
+        </li>
+        <li class="listitem" style="list-style-type: *">
+         <p id="ch9Using_Linux_Tools_36">
+          <span class="emphasis">
+           <em>
+            -a
+           </em>
+          </span>
+          lists all files in the given directory, including those whose names start with "." (which are hidden files in Unix). By default, these files are excluded from the list.
+         </p>
+        </li>
+        <li class="listitem" style="list-style-type: *">
+         <p id="ch9Using_Linux_Tools_37">
+          <span class="emphasis">
+           <em>
+            -R
+           </em>
+          </span>
+          recursively lists subdirectories. The command ls -R / would therefore list all files.
+         </p>
+        </li>
+        <li class="listitem" style="list-style-type: *">
+         <p id="ch9Using_Linux_Tools_38">
+          <span class="emphasis">
+           <em>
+            -d
+           </em>
+          </span>
+          shows information about a symbolic link or directory, rather than about the link's target or listing the contents of a directory.
+         </p>
+        </li>
+        <li class="listitem" style="list-style-type: *">
+         <p id="ch9Using_Linux_Tools_39">
+          <span class="emphasis">
+           <em>
+            -t
+           </em>
+          </span>
+          sort the list of files by modification time.
+         </p>
+        </li>
+        <li class="listitem" style="list-style-type: *">
+         <p id="ch9Using_Linux_Tools_3a">
+          <span class="emphasis">
+           <em>
+            -h
+           </em>
+          </span>
+          print sizes in human readable format. (e.g., 1K, 234M, 2G, etc.)
+         </p>
+        </li>
+       </ul>
+      </div>
+      <p id="ch9Using_Linux_Tools_3b">
+       In some environments, providing the option
+       <span class="emphasis">
+        <em>
+         --color
+        </em>
+       </span>
+       (for GNU ls) or
+       <span class="emphasis">
+        <em>
+         -G
+        </em>
+       </span>
+       (FreeBSD ls) causes ls to highlight different types of files with different colors, instead of with characters as
+       <span class="emphasis">
+        <em>
+         -F
+        </em>
+       </span>
+       would. To determine what color to use for a file, GNU
+       <span class="emphasis">
+        <em>
+         ls
+        </em>
+       </span>
+       checks the Unix file type, the file permissions, and the file extension, while FreeBSD
+       <span class="emphasis">
+        <em>
+         ls
+        </em>
+       </span>
+       checks only the Unix file type and file permissions.:
+      </p>
+      <pre class="programlisting">
+       $ ls
 jeeves.rst psmith.html blandings.html
 $ ls -l
 drwxr--r--   1 plum  editors   4096  jeeves
 -rw-r--r--   1 plum  editors  30405  psmith
--r-xr-xr-x   1 plum  plum      8460  blandings</pre>
-<p><a name="ch9Using_Linux_Tools_3c"></a>Here "$" actually is the beginning of the prompt. This is typical in most Unix-based systems.</p>
-</div>
-<div class="section" title="3.2. date">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="id2946687"></a>3.2. date</h3></div></div></div>
-<p><a name="ch9Using_Linux_Tools_3d"></a>The Unix date command displays the time and date. The super-user can use it to set the system clock.</p>
-<p><a name="ch9Using_Linux_Tools_3e"></a>With no options, the date command displays the current date and time, including the abbreviated day name, abbreviated month name, day of the month, the time separated by colons, the timezone name, and the year. For example:</p>
-<pre class="programlisting">
-$date
-Tue Sep  8 12:01:45 IST 2009</pre>
-<p><a name="ch9Using_Linux_Tools_3f"></a>On some systems to set the current date and time to September 8, 2004 01:22 you type:</p>
-<pre class="programlisting">
-$date --set="20040908 01:22"</pre>
-<p><a name="ch9Using_Linux_Tools_40"></a>In order to view the various options for the <span class="emphasis"><em>date</em></span> command, type:</p>
-<pre class="programlisting">
-$man date</pre>
-<p><a name="ch9Using_Linux_Tools_41"></a>This will take you to the "Manual" page comprising of all the details on the <span class="emphasis"><em>date</em></span> command. You can return to the terminal from the "man" page by pressing the <span class="emphasis"><em>Esc</em></span> key in the keyboard and typing ":q" in that order.</p>
-</div>
-<div class="section" title="3.3. cd">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="id2946747"></a>3.3. cd</h3></div></div></div>
-<p><a name="ch9Using_Linux_Tools_42"></a>This stands for "change directory". When one wants to go up to the parent directory, bypassing the tree of directories one has entered, “ cd ..” can be used.</p>
-<p><a name="ch9Using_Linux_Tools_43"></a>One dot '.' represents the current directory while two dots '..' represent the parent directory.</p>
-<p><a name="ch9Using_Linux_Tools_44"></a>“ cd -” will return you to the previous directory (a bit like an “undo”).</p>
-<p><a name="ch9Using_Linux_Tools_45"></a>You can also use cd absolute path or cd relative path (see below):</p>
-<p><a name="ch9Using_Linux_Tools_46"></a>Absolute paths:</p>
-<p><a name="ch9Using_Linux_Tools_47"></a>An “ absolute path” is easily recognised from the leading forward slash, /. The / means that you start at the top level directory and continue down.</p>
-<p><a name="ch9Using_Linux_Tools_48"></a>For example to get to /boot/grub you would type:</p>
-<pre class="programlisting">
-$cd /boot/grub</pre>
-<p><a name="ch9Using_Linux_Tools_49"></a>This is an absolute path because you start at the top of the hierarchy and go downwards from there (it doesn't matter where in the filesystem you were when you typed the command).</p>
-<p><a name="ch9Using_Linux_Tools_4a"></a>Relative paths:</p>
-<p><a name="ch9Using_Linux_Tools_4b"></a>A “ relative path” doesn't have a preceding slash. Use a relative path when you start from a directory below the top level directory structure. This is dependent on where you are in the filesystem.</p>
-<p><a name="ch9Using_Linux_Tools_4c"></a>For example if you are in root's home directory and want to get to /root/music, you type:</p>
-<pre class="programlisting">
-$ cd music</pre>
-<p><a name="ch9Using_Linux_Tools_4d"></a>Please note that there is no / using the above cd command. Using a / would cause this to be an absolute path, working from the top of the hierarchy downward.</p>
-</div>
-<div class="section" title="3.4. who">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="id2946849"></a>3.4. who</h3></div></div></div>
-<p><a name="ch9Using_Linux_Tools_4e"></a>The standard Unix command <span class="emphasis"><em>who</em></span> displays a list of users who are currently logged into a computer.</p>
-<p><a name="ch9Using_Linux_Tools_4f"></a>The <span class="emphasis"><em>who</em></span> command is related to the command <span class="emphasis"><em>w</em></span>, which provides the same information but also displays additional data and statistics.:</p>
-<pre class="programlisting">
-$who
+-r-xr-xr-x   1 plum  plum      8460  blandings
+      </pre>
+      <p id="ch9Using_Linux_Tools_3c">
+       Here "$" actually is the beginning of the prompt. This is typical in most Unix-based systems.
+      </p>
+     </div>
+     <div class="section" title="3.2.date">
+      <div class="titlepage">
+       <div>
+        <div>
+         <h3 class="title">
+          <a name="id2625356">
+          </a>
+          3.2.date
+         </h3>
+        </div>
+       </div>
+      </div>
+      <p id="ch9Using_Linux_Tools_3d">
+       The Unix date command displays the time and date. The super-user can use it to set the system clock.
+      </p>
+      <p id="ch9Using_Linux_Tools_3e">
+       With no options, the date command displays the current date and time, including the abbreviated day name, abbreviated month name, day of the month, the time separated by colons, the timezone name, and the year. For example:
+      </p>
+      <pre class="programlisting">
+       $date
+Tue Sep  8 12:01:45 IST 2009
+      </pre>
+      <p id="ch9Using_Linux_Tools_3f">
+       On some systems to set the current date and time to September 8, 2004 01:22 you type:
+      </p>
+      <pre class="programlisting">
+       $date --set="20040908 01:22"
+      </pre>
+      <p id="ch9Using_Linux_Tools_40">
+       In order to view the various options for the
+       <span class="emphasis">
+        <em>
+         date
+        </em>
+       </span>
+       command, type:
+      </p>
+      <pre class="programlisting">
+       $man date
+      </pre>
+      <p id="ch9Using_Linux_Tools_41">
+       This will take you to the "Manual" page comprising of all the details on the
+       <span class="emphasis">
+        <em>
+         date
+        </em>
+       </span>
+       command. You can return to the terminal from the "man" page by pressing the
+       <span class="emphasis">
+        <em>
+         Esc
+        </em>
+       </span>
+       key in the keyboard and typing ":q" in that order.
+      </p>
+     </div>
+     <div class="section" title="3.3.cd">
+      <div class="titlepage">
+       <div>
+        <div>
+         <h3 class="title">
+          <a name="id2625416">
+          </a>
+          3.3.cd
+         </h3>
+        </div>
+       </div>
+      </div>
+      <p id="ch9Using_Linux_Tools_42">
+       This stands for "change directory". When one wants to go up to the parent directory, bypassing the tree of directories one has entered,  cd .. can be used.
+      </p>
+      <p id="ch9Using_Linux_Tools_43">
+       One dot '.' represents the current directory while two dots '..' represent the parent directory.
+      </p>
+      <p id="ch9Using_Linux_Tools_44">
+       cd - will return you to the previous directory (a bit like an undo).
+      </p>
+      <p id="ch9Using_Linux_Tools_45">
+       You can also use cd absolute path or cd relative path (see below):
+      </p>
+      <p id="ch9Using_Linux_Tools_46">
+       Absolute paths:
+      </p>
+      <p id="ch9Using_Linux_Tools_47">
+       An  absolute path is easily recognised from the leading forward slash, /. The / means that you start at the top level directory and continue down.
+      </p>
+      <p id="ch9Using_Linux_Tools_48">
+       For example to get to /boot/grub you would type:
+      </p>
+      <pre class="programlisting">
+       $cd /boot/grub
+      </pre>
+      <p id="ch9Using_Linux_Tools_49">
+       This is an absolute path because you start at the top of the hierarchy and go downwards from there (it doesn't matter where in the filesystem you were when you typed the command).
+      </p>
+      <p id="ch9Using_Linux_Tools_4a">
+       Relative paths:
+      </p>
+      <p id="ch9Using_Linux_Tools_4b">
+       A  relative path doesn't have a preceding slash. Use a relative path when you start from a directory below the top level directory structure. This is dependent on where you are in the filesystem.
+      </p>
+      <p id="ch9Using_Linux_Tools_4c">
+       For example if you are in root's home directory and want to get to /root/music, you type:
+      </p>
+      <pre class="programlisting">
+       $ cd music
+      </pre>
+      <p id="ch9Using_Linux_Tools_4d">
+       Please note that there is no / using the above cd command. Using a / would cause this to be an absolute path, working from the top of the hierarchy downward.
+      </p>
+     </div>
+     <div class="section" title="3.4.who">
+      <div class="titlepage">
+       <div>
+        <div>
+         <h3 class="title">
+          <a name="id2625517">
+          </a>
+          3.4.who
+         </h3>
+        </div>
+       </div>
+      </div>
+      <p id="ch9Using_Linux_Tools_4e">
+       The standard Unix command
+       <span class="emphasis">
+        <em>
+         who
+        </em>
+       </span>
+       displays a list of users who are currently logged into a computer.
+      </p>
+      <p id="ch9Using_Linux_Tools_4f">
+       The
+       <span class="emphasis">
+        <em>
+         who
+        </em>
+       </span>
+       command is related to the command
+       <span class="emphasis">
+        <em>
+         w
+        </em>
+       </span>
+       , which provides the same information but also displays additional data and statistics.:
+      </p>
+      <pre class="programlisting">
+       $who
 beeblebrox tty7         2009-09-08 10:50 (:0)
 beeblebrox pts/0        2009-09-08 11:25 (:0.0)
 dumbledore pts/1        2009-09-08 18:11 (potter.xyz.in)
-beeblebrox pts/2        2009-09-08 18:53 (:0.0)</pre>
-<p><a name="ch9Using_Linux_Tools_50"></a>The command can be invoked with the arguments <span class="emphasis"><em>am i</em></span> or <span class="emphasis"><em>am I</em></span> (so it is invoked as <span class="emphasis"><em>who am i</em></span> or * who am I*), showing information about the current terminal only (see the <span class="emphasis"><em>-m</em></span> option below, of which this invocation is equivalent).</p>
-<p><a name="ch9Using_Linux_Tools_51"></a>In order to find out the various options that can be appended to the <span class="emphasis"><em>who</em></span> command, check the <span class="emphasis"><em>man</em></span> page by typing out the following in the terminal:</p>
-<pre class="programlisting">
-$man who</pre>
-<p><a name="ch9Using_Linux_Tools_52"></a>This will take you to the "Manual" page containing details about the <span class="emphasis"><em>who</em></span> command</p>
-</div>
-<div class="section" title="3.5. mkdir">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="id2946932"></a>3.5. mkdir</h3></div></div></div>
-<p><a name="ch9Using_Linux_Tools_53"></a>This command is used to make a new directory. Normal usage is as straightforward as follows:</p>
-<pre class="programlisting">
-$mkdir name_of_directory</pre>
-<p><a name="ch9Using_Linux_Tools_54"></a>Where <span class="emphasis"><em>name_of_directory</em></span> is the name of the directory one wants to create. When typed as above (ie. normal usage), the new directory would be created within the current directory. On Unix, multiple directories can be specified, and <span class="emphasis"><em>mkdir</em></span> will try to create all of them.</p>
-<div class="section" title="3.5.1. Options">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="id2946964"></a>3.5.1. Options</h4></div></div></div>
-<p><a name="ch9Using_Linux_Tools_55"></a>On Unix-like operating systems, <span class="emphasis"><em>mkdir</em></span> takes options. Three of the most common options are:</p>
-<div class="itemizedlist"><ul class="itemizedlist" type="*">
-<li class="listitem" style="list-style-type: *"><p><a name="ch9Using_Linux_Tools_56"></a><span class="emphasis"><em>-p</em></span>: will also create all directories leading up to the given directory that do not exist already. If the given directory already exists, ignore the error.</p></li>
-<li class="listitem" style="list-style-type: *"><p><a name="ch9Using_Linux_Tools_57"></a><span class="emphasis"><em>-v</em></span>: display each directory that mkdir creates. Most often used with -p.</p></li>
-<li class="listitem" style="list-style-type: *"><p><a name="ch9Using_Linux_Tools_58"></a><span class="emphasis"><em>-m</em></span>: specify the octal permissions of directories created by mkdir.</p></li>
-</ul></div>
-<p><a name="ch9Using_Linux_Tools_59"></a><span class="emphasis"><em>-p</em></span> is most often used when using mkdir to build up complex directory hierarchies, in case a necessary directory is missing or already there. -m is commonly used to lock down temporary directories used by shell scripts.</p>
-</div>
-<div class="section" title="3.5.2. Examples">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="id2947023"></a>3.5.2. Examples</h4></div></div></div>
-<p><a name="ch9Using_Linux_Tools_5a"></a>An example of <span class="emphasis"><em>-p</em></span> in action is:</p>
-<pre class="programlisting">
-$mkdir -p /tmp/a/b/c</pre>
-<p><a name="ch9Using_Linux_Tools_5b"></a>If <span class="emphasis"><em>/tmp/a</em></span> exists but <span class="emphasis"><em>/tmp/a/b</em></span> does not, mkdir will create <span class="emphasis"><em>/tmp/a/b</em></span> before creating <span class="emphasis"><em>/tmp/a/b/c</em></span>.</p>
-<p><a name="ch9Using_Linux_Tools_5c"></a>And an even more powerful command, creating a full tree at once (this however is a Shell extension, nothing mkdir does itself):</p>
-<pre class="programlisting">
-$mkdir -p tmpdir/{trunk/sources/{includes,docs},branches,tags}</pre>
-<p><a name="ch9Using_Linux_Tools_5d"></a>This will create:</p>tmpdir  - branches<div class="itemizedlist"><ul class="itemizedlist" type="*">
-<li class="listitem" style="list-style-type: *"><p><a name="ch9Using_Linux_Tools_5e"></a>tag</p></li>
-<li class="listitem" style="list-style-type: *">trunk - sources - includes<div class="itemizedlist"><ul class="itemizedlist" type="*"><li class="listitem" style="list-style-type: *"><p><a name="ch9Using_Linux_Tools_5f"></a>docs</p></li></ul></div>
-</li>
-</ul></div>
-</div>
-</div>
-</div>
-<div class="section" title="4. Getting Help">
-<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="id2947099"></a>4. Getting Help</h2></div></div></div>
-<div class="section" title="4.1. apropos and whatis">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="id2947108"></a>4.1. apropos and whatis</h3></div></div></div>
-<p><a name="ch9Using_Linux_Tools_60"></a>This is a command to search the manual pages files in Unix and Unix-like operating systems.</p>
-<pre class="programlisting">
-$ apropos grep
+beeblebrox pts/2        2009-09-08 18:53 (:0.0)
+      </pre>
+      <p id="ch9Using_Linux_Tools_50">
+       The command can be invoked with the arguments
+       <span class="emphasis">
+        <em>
+         am i
+        </em>
+       </span>
+       or
+       <span class="emphasis">
+        <em>
+         am I
+        </em>
+       </span>
+       (so it is invoked as
+       <span class="emphasis">
+        <em>
+         who am i
+        </em>
+       </span>
+       or * who am I*), showing information about the current terminal only (see the
+       <span class="emphasis">
+        <em>
+         -m
+        </em>
+       </span>
+       option below, of which this invocation is equivalent).
+      </p>
+      <p id="ch9Using_Linux_Tools_51">
+       In order to find out the various options that can be appended to the
+       <span class="emphasis">
+        <em>
+         who
+        </em>
+       </span>
+       command, check the
+       <span class="emphasis">
+        <em>
+         man
+        </em>
+       </span>
+       page by typing out the following in the terminal:
+      </p>
+      <pre class="programlisting">
+       $man who
+      </pre>
+      <p id="ch9Using_Linux_Tools_52">
+       This will take you to the "Manual" page containing details about the
+       <span class="emphasis">
+        <em>
+         who
+        </em>
+       </span>
+       command
+      </p>
+     </div>
+     <div class="section" title="3.5.mkdir">
+      <div class="titlepage">
+       <div>
+        <div>
+         <h3 class="title">
+          <a name="id2625600">
+          </a>
+          3.5.mkdir
+         </h3>
+        </div>
+       </div>
+      </div>
+      <p id="ch9Using_Linux_Tools_53">
+       This command is used to make a new directory. Normal usage is as straightforward as follows:
+      </p>
+      <pre class="programlisting">
+       $mkdir name_of_directory
+      </pre>
+      <p id="ch9Using_Linux_Tools_54">
+       Where
+       <span class="emphasis">
+        <em>
+         name_of_directory
+        </em>
+       </span>
+       is the name of the directory one wants to create. When typed as above (ie. normal usage), the new directory would be created within the current directory. On Unix, multiple directories can be specified, and
+       <span class="emphasis">
+        <em>
+         mkdir
+        </em>
+       </span>
+       will try to create all of them.
+      </p>
+      <div class="section" title="3.5.1.Options">
+       <div class="titlepage">
+        <div>
+         <div>
+          <h4 class="title">
+           <a name="id2625632">
+           </a>
+           3.5.1.Options
+          </h4>
+         </div>
+        </div>
+       </div>
+       <p id="ch9Using_Linux_Tools_55">
+        On Unix-like operating systems,
+        <span class="emphasis">
+         <em>
+          mkdir
+         </em>
+        </span>
+        takes options. Three of the most common options are:
+       </p>
+       <div class="itemizedlist">
+        <ul class="itemizedlist" type="*">
+         <li class="listitem" style="list-style-type: *">
+          <p id="ch9Using_Linux_Tools_56">
+           <span class="emphasis">
+            <em>
+             -p
+            </em>
+           </span>
+           : will also create all directories leading up to the given directory that do not exist already. If the given directory already exists, ignore the error.
+          </p>
+         </li>
+         <li class="listitem" style="list-style-type: *">
+          <p id="ch9Using_Linux_Tools_57">
+           <span class="emphasis">
+            <em>
+             -v
+            </em>
+           </span>
+           : display each directory that mkdir creates. Most often used with -p.
+          </p>
+         </li>
+         <li class="listitem" style="list-style-type: *">
+          <p id="ch9Using_Linux_Tools_58">
+           <span class="emphasis">
+            <em>
+             -m
+            </em>
+           </span>
+           : specify the octal permissions of directories created by mkdir.
+          </p>
+         </li>
+        </ul>
+       </div>
+       <p id="ch9Using_Linux_Tools_59">
+        <span class="emphasis">
+         <em>
+          -p
+         </em>
+        </span>
+        is most often used when using mkdir to build up complex directory hierarchies, in case a necessary directory is missing or already there. -m is commonly used to lock down temporary directories used by shell scripts.
+       </p>
+      </div>
+      <div class="section" title="3.5.2.Examples">
+       <div class="titlepage">
+        <div>
+         <div>
+          <h4 class="title">
+           <a name="id2625692">
+           </a>
+           3.5.2.Examples
+          </h4>
+         </div>
+        </div>
+       </div>
+       <p id="ch9Using_Linux_Tools_5a">
+        An example of
+        <span class="emphasis">
+         <em>
+          -p
+         </em>
+        </span>
+        in action is:
+       </p>
+       <pre class="programlisting">
+        $mkdir -p /tmp/a/b/c
+       </pre>
+       <p id="ch9Using_Linux_Tools_5b">
+        If
+        <span class="emphasis">
+         <em>
+          /tmp/a
+         </em>
+        </span>
+        exists but
+        <span class="emphasis">
+         <em>
+          /tmp/a/b
+         </em>
+        </span>
+        does not, mkdir will create
+        <span class="emphasis">
+         <em>
+          /tmp/a/b
+         </em>
+        </span>
+        before creating
+        <span class="emphasis">
+         <em>
+          /tmp/a/b/c
+         </em>
+        </span>
+        .
+       </p>
+       <p id="ch9Using_Linux_Tools_5c">
+        And an even more powerful command, creating a full tree at once (this however is a Shell extension, nothing mkdir does itself):
+       </p>
+       <pre class="programlisting">
+        $mkdir -p tmpdir/{trunk/sources/{includes,docs},branches,tags}
+       </pre>
+       <p id="ch9Using_Linux_Tools_5d">
+        This will create:
+       </p>
+       tmpdir  - branches
+       <div class="itemizedlist">
+        <ul class="itemizedlist" type="*">
+         <li class="listitem" style="list-style-type: *">
+          <p id="ch9Using_Linux_Tools_5e">
+           tag
+          </p>
+         </li>
+         <li class="listitem" style="list-style-type: *">
+          trunk - sources - includes
+          <div class="itemizedlist">
+           <ul class="itemizedlist" type="*">
+            <li class="listitem" style="list-style-type: *">
+             <p id="ch9Using_Linux_Tools_5f">
+              docs
+             </p>
+            </li>
+           </ul>
+          </div>
+         </li>
+        </ul>
+       </div>
+      </div>
+     </div>
+    </div>
+    <div class="section" title="4.Getting Help">
+     <div class="titlepage">
+      <div>
+       <div>
+        <h2 class="title" style="clear: both">
+         <a name="id2625768">
+         </a>
+         4.Getting Help
+        </h2>
+       </div>
+      </div>
+     </div>
+     <div class="section" title="4.1.apropos and whatis">
+      <div class="titlepage">
+       <div>
+        <div>
+         <h3 class="title">
+          <a name="id2625776">
+          </a>
+          4.1.apropos and whatis
+         </h3>
+        </div>
+       </div>
+      </div>
+      <p id="ch9Using_Linux_Tools_60">
+       This is a command to search the manual pages files in Unix and Unix-like operating systems.
+      </p>
+      <pre class="programlisting">
+       $ apropos grep
 egrep       egrep (1)       Search a file for a pattern using full regular expressions
 fgrep       fgrep (1)       Search a file for a fixed-character string
 fmlgrep     fmlgrep (1)     Search a file for a pattern
@@ -414,16 +1945,50 @@
 nisgrep     nismatch (1)    Utilities for searching NIS+ tables
 pgrep       pgrep (1)       Find or signal a process by name or other attribute
 zgrep       zgrep (1)       Search a possibly compressed file for a regular expression
-...</pre>
-<p><a name="ch9Using_Linux_Tools_61"></a>In this example, the user uses <span class="emphasis"><em>apropos</em></span> to search for the string "grep", and apropos returns the indicated <span class="emphasis"><em>man</em></span> pages that include the term "grep".</p>
-<p><a name="ch9Using_Linux_Tools_62"></a>A short index of explanations for commands is available using the <span class="emphasis"><em>whatis</em></span> command, like in the examples below:</p>
-<pre class="programlisting">
-$whatis ls
-ls (1)           - list directory contents</pre>
-<p><a name="ch9Using_Linux_Tools_63"></a>This displays short information about a command, and the first section in the collection of man pages that contains an appropriate page.</p>
-<p><a name="ch9Using_Linux_Tools_64"></a>If you don't know where to get started and which man page to read, <span class="emphasis"><em>apropos</em></span> gives more information. Say that you do not know how to start a browser, then you could enter the following command:</p>
-<pre class="programlisting">
-$apropos browser
+...
+      </pre>
+      <p id="ch9Using_Linux_Tools_61">
+       In this example, the user uses
+       <span class="emphasis">
+        <em>
+         apropos
+        </em>
+       </span>
+       to search for the string "grep", and apropos returns the indicated
+       <span class="emphasis">
+        <em>
+         man
+        </em>
+       </span>
+       pages that include the term "grep".
+      </p>
+      <p id="ch9Using_Linux_Tools_62">
+       A short index of explanations for commands is available using the
+       <span class="emphasis">
+        <em>
+         whatis
+        </em>
+       </span>
+       command, like in the examples below:
+      </p>
+      <pre class="programlisting">
+       $whatis ls
+ls (1)           - list directory contents
+      </pre>
+      <p id="ch9Using_Linux_Tools_63">
+       This displays short information about a command, and the first section in the collection of man pages that contains an appropriate page.
+      </p>
+      <p id="ch9Using_Linux_Tools_64">
+       If you don't know where to get started and which man page to read,
+       <span class="emphasis">
+        <em>
+         apropos
+        </em>
+       </span>
+       gives more information. Say that you do not know how to start a browser, then you could enter the following command:
+      </p>
+      <pre class="programlisting">
+       $apropos browser
 gmusicbrowser (1)    - Jukebox for large collections of audio files
 infobrowser (1)      - read Info documents
 libsmbclient (7)     - An extension library for browsers and that               can be used...
@@ -434,58 +1999,261 @@
 viewres (1)          - graphical class browser for Xt
 w3m (1)              - a text based Web browser and pager
 www-browser (1)      - a text based Web browser and pager
-...</pre>
-</div>
-<div class="section" title="4.2. man">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="id2947202"></a>4.2. man</h3></div></div></div>
-<p><a name="ch9Using_Linux_Tools_65"></a>Man pages (short for "manual pages") are the extensive documentation that comes preinstalled with almost all substantial Unix and Unix-like operating systems. The Unix command used to display them is <span class="emphasis"><em>man</em></span>. Each page is a self-contained document.</p>
-<p><a name="ch9Using_Linux_Tools_66"></a>To read a manual page for a Unix command, one can use:</p>
-<pre class="programlisting">
-$ man &lt;command_name&gt;</pre>
-<p><a name="ch9Using_Linux_Tools_67"></a>at a shell prompt; for example, "man ftp". In order to simplify navigation through the output, <span class="emphasis"><em>man</em></span> generally uses the less terminal pager.</p>
-<p><a name="ch9Using_Linux_Tools_68"></a>Pages are traditionally referred to using the notation "name(section)"; for example, ftp(1). The same page name may appear in more than one section of the manual, this can occur when the names of system calls, user commands, or macro packages coincide. Two examples are <span class="emphasis"><em>man(1)</em></span> and <span class="emphasis"><em>man(7)</em></span>, or <span class="emphasis"><em>exit(2)</em></span> and <span class="emphasis"><em>exit(3)</em></span>. The syntax for accessing the non-default manual section varies between different man implementations. On Linux and <span class="emphasis"><em>BSD, for example, the syntax for reading *printf(3)</em></span> is:</p>
-<pre class="programlisting">
-$man 3 printf</pre>
-<p><a name="ch9Using_Linux_Tools_69"></a>Another example:</p>
-<pre class="programlisting">
-$man man</pre>
-<p><a name="ch9Using_Linux_Tools_6a"></a>The previous example will take you to the "Manual" page entry about manual pages!</p>
-<div class="section" title="4.2.1. Layout">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="id2947285"></a>4.2.1. Layout</h4></div></div></div>
-<p><a name="ch9Using_Linux_Tools_6b"></a>All man pages follow a common layout that is optimized for presentation on a simple ASCII text display, possibly without any form of highlighting or font control. Sections present may include:</p>NAME<p><a name="ch9Using_Linux_Tools_6c"></a>The name of the command or function, followed by a one-line description of what it does.</p>SYNOPSIS<p><a name="ch9Using_Linux_Tools_6d"></a>In the case of a command, you get a formal description of how to run it and what command line options it takes. For program functions, a list of the parameters the function takes and which header file contains its definition. For experienced users, this may be all the documentation they need.</p>DESCRIPTION<p><a name="ch9Using_Linux_Tools_6e"></a>A textual description of the functioning of the command or function.</p>EXAMPLES<p><a name="ch9Using_Linux_Tools_6f"></a>Some examples of common usage.</p>SEE ALSO<p><a name="ch9Using_Linux_Tools_70"></a>A list of related commands or functions.</p>
-<p><a name="ch9Using_Linux_Tools_71"></a>Other sections may be present, but these are not well standardized across man pages. Common examples include: OPTIONS, EXIT STATUS, ENVIRONMENT, KNOWN BUGS, FILES, AUTHOR, REPORTING BUGS, HISTORY and COPYRIGHT.</p>
-<p><a name="ch9Using_Linux_Tools_72"></a>These days virtually every Unix command line application comes with its man page, and many Unix users perceive a lack of man pages as a sign of low quality; indeed, some projects, such as Debian, go out of their way to write man pages for programs lacking one. Few alternatives to <span class="emphasis"><em>man</em></span> have enjoyed much popularity, with the possible exception of the GNU project's "info" system, an early and simple hypertext system.</p>
-<p><a name="ch9Using_Linux_Tools_73"></a>However, the format of a single page for each application, the lack of classification within the sections and the relatively unsophisticated formatting facilities have motivated the development of alternative documentation systems, such as the previously mentioned "info" system.</p>
-<p><a name="ch9Using_Linux_Tools_74"></a>Most Unix GUI applications (particularly those built using the GNOME and KDE development environments) now provide end-user documentation in HTML and include embedded HTML viewers such as yelp for reading the help within the application.</p>
-<p><a name="ch9Using_Linux_Tools_75"></a>Usually the man pages are written in English. Translations into other languages can be also available on the system.</p>
-<p><a name="ch9Using_Linux_Tools_76"></a>The default format of the man pages is troff, with either the macro package man (appearance oriented) or on some systems mdoc (semantic oriented). This makes it possible to typeset a man page to PostScript, PDF and various other formats for viewing or printing.</p>
-</div>
-</div>
-<div class="section" title="4.3. info">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="id2947396"></a>4.3. info</h3></div></div></div>
-<p><a name="ch9Using_Linux_Tools_77"></a><span class="emphasis"><em>info</em></span> is a software utility which forms a hypertextual, multipage documentation and help viewer working on a command line interface, useful when there is no GUI available.</p>
-<p><a name="ch9Using_Linux_Tools_78"></a>The syntax is</p>
-<pre class="programlisting">
-$ info &lt;command_name&gt;</pre>
-<p><a name="ch9Using_Linux_Tools_79"></a><span class="emphasis"><em>info</em></span> processes info files, which are Texinfo formatted files, and presents the documentation as a tree, with simple commands to traverse the tree and to follow cross references. For instance</p>
-<div class="itemizedlist"><ul class="itemizedlist" type="*">
-<li class="listitem" style="list-style-type: *"><p><a name="ch9Using_Linux_Tools_7a"></a><span class="emphasis"><em>n</em></span> goes to the next page.</p></li>
-<li class="listitem" style="list-style-type: *"><p><a name="ch9Using_Linux_Tools_7b"></a><span class="emphasis"><em>p</em></span> goes to the previous page.</p></li>
-<li class="listitem" style="list-style-type: *"><p><a name="ch9Using_Linux_Tools_7c"></a><span class="emphasis"><em>u</em></span> goes to the upper page.</p></li>
-<li class="listitem" style="list-style-type: *"><p><a name="ch9Using_Linux_Tools_7d"></a><span class="emphasis"><em>l</em></span> goes to the last(visited) node</p></li>
-<li class="listitem" style="list-style-type: *"><p><a name="ch9Using_Linux_Tools_7e"></a>To follow a cross reference, the cursor can be moved over a link (a word preceded by a *) and enter pressed.</p></li>
-</ul></div>
-<p><a name="ch9Using_Linux_Tools_7f"></a>info was initially written for use with GNU/Linux and then ported to other Unix-like operating systems.</p>
-</div>
-<div class="section" title="4.4. --help">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="id2947484"></a>4.4. --help</h3></div></div></div>
-<p><a name="ch9Using_Linux_Tools_80"></a>Most GNU commands support the --help, which gives a short explanation about how to use the command and a list of available options. Below is the output of this option with the <span class="emphasis"><em>cat</em></span> command:</p>
-<pre class="programlisting">
-$ userprompt@host: cat --help
+...
+      </pre>
+     </div>
+     <div class="section" title="4.2.man">
+      <div class="titlepage">
+       <div>
+        <div>
+         <h3 class="title">
+          <a name="id2625871">
+          </a>
+          4.2.man
+         </h3>
+        </div>
+       </div>
+      </div>
+      <p id="ch9Using_Linux_Tools_65">
+       Man pages (short for "manual pages") are the extensive documentation that comes preinstalled with almost all substantial Unix and Unix-like operating systems. The Unix command used to display them is
+       <span class="emphasis">
+        <em>
+         man
+        </em>
+       </span>
+       . Each page is a self-contained document.
+      </p>
+      <p id="ch9Using_Linux_Tools_66">
+       To read a manual page for a Unix command, one can use:
+      </p>
+      <pre class="programlisting">
+       $ man &lt;command_name&gt;
+      </pre>
+      <p id="ch9Using_Linux_Tools_67">
+       at a shell prompt; for example, "man ftp". In order to simplify navigation through the output,
+       <span class="emphasis">
+        <em>
+         man
+        </em>
+       </span>
+       generally uses the less terminal pager.
+      </p>
+      <p id="ch9Using_Linux_Tools_68">
+       Pages are traditionally referred to using the notation "name(section)"; for example, ftp(1). The same page name may appear in more than one section of the manual, this can occur when the names of system calls, user commands, or macro packages coincide. Two examples are
+       <span class="emphasis">
+        <em>
+         man(1)
+        </em>
+       </span>
+       and
+       <span class="emphasis">
+        <em>
+         man(7)
+        </em>
+       </span>
+       , or
+       <span class="emphasis">
+        <em>
+         exit(2)
+        </em>
+       </span>
+       and
+       <span class="emphasis">
+        <em>
+         exit(3)
+        </em>
+       </span>
+       . The syntax for accessing the non-default manual section varies between different man implementations. On Linux and
+       <span class="emphasis">
+        <em>
+         BSD, for example, the syntax for reading *printf(3)
+        </em>
+       </span>
+       is:
+      </p>
+      <pre class="programlisting">
+       $man 3 printf
+      </pre>
+      <p id="ch9Using_Linux_Tools_69">
+       Another example:
+      </p>
+      <pre class="programlisting">
+       $man man
+      </pre>
+      <p id="ch9Using_Linux_Tools_6a">
+       The previous example will take you to the "Manual" page entry about manual pages!
+      </p>
+      <div class="section" title="4.2.1.Layout">
+       <div class="titlepage">
+        <div>
+         <div>
+          <h4 class="title">
+           <a name="id2625954">
+           </a>
+           4.2.1.Layout
+          </h4>
+         </div>
+        </div>
+       </div>
+       <p id="ch9Using_Linux_Tools_6b">
+        All man pages follow a common layout that is optimized for presentation on a simple ASCII text display, possibly without any form of highlighting or font control. Sections present may include:
+       </p>
+       NAME
+       <p id="ch9Using_Linux_Tools_6c">
+        The name of the command or function, followed by a one-line description of what it does.
+       </p>
+       SYNOPSIS
+       <p id="ch9Using_Linux_Tools_6d">
+        In the case of a command, you get a formal description of how to run it and what command line options it takes. For program functions, a list of the parameters the function takes and which header file contains its definition. For experienced users, this may be all the documentation they need.
+       </p>
+       DESCRIPTION
+       <p id="ch9Using_Linux_Tools_6e">
+        A textual description of the functioning of the command or function.
+       </p>
+       EXAMPLES
+       <p id="ch9Using_Linux_Tools_6f">
+        Some examples of common usage.
+       </p>
+       SEE ALSO
+       <p id="ch9Using_Linux_Tools_70">
+        A list of related commands or functions.
+       </p>
+       <p id="ch9Using_Linux_Tools_71">
+        Other sections may be present, but these are not well standardized across man pages. Common examples include: OPTIONS, EXIT STATUS, ENVIRONMENT, KNOWN BUGS, FILES, AUTHOR, REPORTING BUGS, HISTORY and COPYRIGHT.
+       </p>
+       <p id="ch9Using_Linux_Tools_72">
+        These days virtually every Unix command line application comes with its man page, and many Unix users perceive a lack of man pages as a sign of low quality; indeed, some projects, such as Debian, go out of their way to write man pages for programs lacking one. Few alternatives to
+        <span class="emphasis">
+         <em>
+          man
+         </em>
+        </span>
+        have enjoyed much popularity, with the possible exception of the GNU project's "info" system, an early and simple hypertext system.
+       </p>
+       <p id="ch9Using_Linux_Tools_73">
+        However, the format of a single page for each application, the lack of classification within the sections and the relatively unsophisticated formatting facilities have motivated the development of alternative documentation systems, such as the previously mentioned "info" system.
+       </p>
+       <p id="ch9Using_Linux_Tools_74">
+        Most Unix GUI applications (particularly those built using the GNOME and KDE development environments) now provide end-user documentation in HTML and include embedded HTML viewers such as yelp for reading the help within the application.
+       </p>
+       <p id="ch9Using_Linux_Tools_75">
+        Usually the man pages are written in English. Translations into other languages can be also available on the system.
+       </p>
+       <p id="ch9Using_Linux_Tools_76">
+        The default format of the man pages is troff, with either the macro package man (appearance oriented) or on some systems mdoc (semantic oriented). This makes it possible to typeset a man page to PostScript, PDF and various other formats for viewing or printing.
+       </p>
+      </div>
+     </div>
+     <div class="section" title="4.3.info">
+      <div class="titlepage">
+       <div>
+        <div>
+         <h3 class="title">
+          <a name="id2626065">
+          </a>
+          4.3.info
+         </h3>
+        </div>
+       </div>
+      </div>
+      <p id="ch9Using_Linux_Tools_77">
+       <span class="emphasis">
+        <em>
+         info
+        </em>
+       </span>
+       is a software utility which forms a hypertextual, multipage documentation and help viewer working on a command line interface, useful when there is no GUI available.
+      </p>
+      <p id="ch9Using_Linux_Tools_78">
+       The syntax is
+      </p>
+      <pre class="programlisting">
+       $ info &lt;command_name&gt;
+      </pre>
+      <p id="ch9Using_Linux_Tools_79">
+       <span class="emphasis">
+        <em>
+         info
+        </em>
+       </span>
+       processes info files, which are Texinfo formatted files, and presents the documentation as a tree, with simple commands to traverse the tree and to follow cross references. For instance
+      </p>
+      <div class="itemizedlist">
+       <ul class="itemizedlist" type="*">
+        <li class="listitem" style="list-style-type: *">
+         <p id="ch9Using_Linux_Tools_7a">
+          <span class="emphasis">
+           <em>
+            n
+           </em>
+          </span>
+          goes to the next page.
+         </p>
+        </li>
+        <li class="listitem" style="list-style-type: *">
+         <p id="ch9Using_Linux_Tools_7b">
+          <span class="emphasis">
+           <em>
+            p
+           </em>
+          </span>
+          goes to the previous page.
+         </p>
+        </li>
+        <li class="listitem" style="list-style-type: *">
+         <p id="ch9Using_Linux_Tools_7c">
+          <span class="emphasis">
+           <em>
+            u
+           </em>
+          </span>
+          goes to the upper page.
+         </p>
+        </li>
+        <li class="listitem" style="list-style-type: *">
+         <p id="ch9Using_Linux_Tools_7d">
+          <span class="emphasis">
+           <em>
+            l
+           </em>
+          </span>
+          goes to the last(visited) node
+         </p>
+        </li>
+        <li class="listitem" style="list-style-type: *">
+         <p id="ch9Using_Linux_Tools_7e">
+          To follow a cross reference, the cursor can be moved over a link (a word preceded by a *) and enter pressed.
+         </p>
+        </li>
+       </ul>
+      </div>
+      <p id="ch9Using_Linux_Tools_7f">
+       info was initially written for use with GNU/Linux and then ported to other Unix-like operating systems.
+      </p>
+     </div>
+     <div class="section" title="4.4.--help">
+      <div class="titlepage">
+       <div>
+        <div>
+         <h3 class="title">
+          <a name="id2626152">
+          </a>
+          4.4.--help
+         </h3>
+        </div>
+       </div>
+      </div>
+      <p id="ch9Using_Linux_Tools_80">
+       Most GNU commands support the --help, which gives a short explanation about how to use the command and a list of available options. Below is the output of this option with the
+       <span class="emphasis">
+        <em>
+         cat
+        </em>
+       </span>
+       command:
+      </p>
+      <pre class="programlisting">
+       $ userprompt@host: cat --help
 Usage: cat [OPTION] [FILE]...
 Concatenate FILE(s), or standard input, to standard output.
 
@@ -508,95 +2276,361 @@
   cat f - g  Output f's contents, then standard input, then g's           contents.
   cat        Copy standard input to standard output.
 
-Report bugs to &lt;bug-coreutils@gnu.org&gt;.</pre>
-</div>
-</div>
-<div class="section" title="5. Basic file handling">
-<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="id2947536"></a>5. Basic file handling</h2></div></div></div>
-<div class="section" title="5.1. cp">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="id2947545"></a>5.1. cp</h3></div></div></div>
-<p><a name="ch9Using_Linux_Tools_81"></a><span class="emphasis"><em>cp</em></span> is the command entered in a Unix shell to copy a file from one place to another, possibly on a different filesystem. The original file remains unchanged, and the new file may have the same or a different name.</p>
-<div class="section" title="5.1.1. Usage">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="id2947563"></a>5.1.1. Usage</h4></div></div></div>
-<p><a name="ch9Using_Linux_Tools_82"></a>To copy a file to another file:</p>
-<pre class="programlisting">
-$ cp [ -f ] [ -H ] [ -i ] [ -p ][ -- ] SourceFile TargetFile</pre>
-<p><a name="ch9Using_Linux_Tools_83"></a>To copy a file to a directory:</p>
-<pre class="programlisting">
-$ cp [ -f ] [ -H ] [ -i ] [ -p ] [ -r | -R ] [ -- ] SourceFile ...              TargetDirectory</pre>
-<p><a name="ch9Using_Linux_Tools_84"></a>To copy a directory to a directory:</p>
-<pre class="programlisting">
-$ cp [ -f ] [ -H ] [ -i ] [ -p ] [ -- ] { -r | -R }
-SourceDirectory ... TargetDirectory</pre>
-</div>
-<div class="section" title="5.1.2. Flags">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="id2947597"></a>5.1.2. Flags</h4></div></div></div>
-<p><a name="ch9Using_Linux_Tools_85"></a><span class="emphasis"><em>-f</em></span> (force) – specifies removal of the target file if it cannot be opened for write operations. The removal precedes any copying performed by the cp command.</p>
-<p><a name="ch9Using_Linux_Tools_86"></a><span class="emphasis"><em>-P</em></span> – makes the cp command copy symbolic links. The default is to follow symbolic links, that is, to copy files to which symbolic links point.</p>
-<p><a name="ch9Using_Linux_Tools_87"></a><span class="emphasis"><em>-i</em></span> (interactive) – prompts you with the name of a file to be overwritten. This occurs if the TargetDirectory or TargetFile parameter contains a file with the same name as a file specified in the SourceFile or SourceDirectory parameter. If you enter y or the locale's equivalent of y, the cp command continues. Any other answer prevents the cp command from overwriting the file.</p>
-<p><a name="ch9Using_Linux_Tools_88"></a><span class="emphasis"><em>-p</em></span> (preserve) – duplicates the following characteristics of each SourceFile/SourceDirectory in the corresponding TargetFile and/or TargetDirectory:</p>
-<div class="itemizedlist"><ul class="itemizedlist" type="*">
-<li class="listitem" style="list-style-type: *"><p><a name="ch9Using_Linux_Tools_89"></a>The time of the last data modification and the time of the last access.</p></li>
-<li class="listitem" style="list-style-type: *"><p><a name="ch9Using_Linux_Tools_8a"></a>The user ID and group ID (only if it has permissions to do this)</p></li>
-<li class="listitem" style="list-style-type: *"><p><a name="ch9Using_Linux_Tools_8b"></a>The file permission bits and the SUID and SGID bits.</p></li>
-</ul></div>
-<p><a name="ch9Using_Linux_Tools_8c"></a><span class="emphasis"><em>-R</em></span> (recursive) – copy directories (recursively copying all the contents)</p>
-</div>
-<div class="section" title="5.1.3. Examples">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="id2947695"></a>5.1.3. Examples</h4></div></div></div>
-<p><a name="ch9Using_Linux_Tools_8d"></a>To make a copy of a file in the current directory, enter:</p>
-<pre class="programlisting">
-$ cp prog.c prog.bak</pre>
-<p><a name="ch9Using_Linux_Tools_8e"></a>This copies prog.c to prog.bak. If the prog.bak file does not already exist, the cp command creates it. If it does exist, the cp command replaces it with a copy of the prog.c file.</p>
-<p><a name="ch9Using_Linux_Tools_8f"></a>To copy a file in your current directory into another directory, enter:</p>
-<pre class="programlisting">
-$ cp zaphod /home/books/hhgg</pre>
-<p><a name="ch9Using_Linux_Tools_90"></a>This copies the jones file to /home/books/hhgg/zaphod.</p>
-<p><a name="ch9Using_Linux_Tools_91"></a>To copy a file to a new file and preserve the modification date, time, and access control list associated with the source file, enter:</p>
-<pre class="programlisting">
-$ cp -p martin_luther_king martin_luther_king.jr</pre>
-<p><a name="ch9Using_Linux_Tools_92"></a>This copies the <span class="emphasis"><em>martin_luther_king</em></span> file to the <span class="emphasis"><em>martin_luther_king.jr</em></span> file. Instead of creating the file with the current date and time stamp, the system gives the <span class="emphasis"><em>martin_luther_king.jr</em></span> file the same date and time as the <span class="emphasis"><em>martin_luther_king</em></span> file. The <span class="emphasis"><em>martin_luther_king.jr</em></span> file also inherits the <span class="emphasis"><em>martin_luther_king</em></span> file's access control protection.</p>
-<p><a name="ch9Using_Linux_Tools_93"></a>To copy all the files in a directory to a new directory, enter:</p>
-<pre class="programlisting">
-$ cp /home/galactica/clients/* /home/hhgg/customers</pre>
-<p><a name="ch9Using_Linux_Tools_94"></a>This copies only the files in the clients directory to the customers directory.</p>
-<p><a name="ch9Using_Linux_Tools_95"></a>To copy a directory, including all its files and subdirectories, to another directory, enter:</p>
-<p><a name="ch9Using_Linux_Tools_96"></a>$ cp -R /home/hhgg/clients /home/hhgg/customers</p>
-<p><a name="ch9Using_Linux_Tools_97"></a>This copies the clients directory, including all its files, subdirectories, and the files in those subdirectories, to the customers/clients directory.</p>
-<p><a name="ch9Using_Linux_Tools_98"></a>To copy a specific set of files of any extension to another directory, enter:</p>
-<pre class="programlisting">
-$ cp zaphod arthur ford /home/hhgg/clients</pre>
-<p><a name="ch9Using_Linux_Tools_99"></a>This copies the <span class="emphasis"><em>zaphod</em></span>, <span class="emphasis"><em>arthur</em></span>, and <span class="emphasis"><em>ford</em></span> files in your current working directory to the /home/hhgg/clients directory.</p>
-<p><a name="ch9Using_Linux_Tools_9a"></a>To use pattern-matching characters to copy files, enter:</p>
-<pre class="programlisting">
-$ cp programs/*.py .</pre>
-<p><a name="ch9Using_Linux_Tools_9b"></a>This copies the files in the programs directory that end with <span class="emphasis"><em>.py</em></span> to the current directory, signified by the single "." (dot). You must type a space between the <span class="emphasis"><em>py</em></span> and the final dot.</p>
-</div>
-</div>
-<div class="section" title="5.2. mv">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="id2947858"></a>5.2. mv</h3></div></div></div>
-<p><a name="ch9Using_Linux_Tools_9c"></a><span class="emphasis"><em>mv</em></span> (short for move) is a Unix command that moves one or more files or directories from one place to another. The original file is deleted, and the new file may have the same or a different name. If possible (i.e. when the original and new files are on the same file system), <span class="emphasis"><em>mv</em></span> will rename the file instead. Write permission is required on all directories being modified.</p>
-<div class="section" title="5.2.1. Conflicting existing file">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="id2947882"></a>5.2.1. Conflicting existing file</h4></div></div></div>
-<p><a name="ch9Using_Linux_Tools_9d"></a>In all cases, when a file is moved to have the name of an existing file (in the same directory), the existing file is deleted. If the existing file is not writable but is in a directory that is writable, then the mv command asks for confirmation if possible (i.e. if run from a terminal) before proceeding, unless the -f (force) option is used.</p>
-</div>
-<div class="section" title="5.2.2. Differences with copy and delete">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="id2947901"></a>5.2.2. Differences with copy and delete</h4></div></div></div>
-<p><a name="ch9Using_Linux_Tools_9e"></a>Note that, usually, when moving files within the same volume, moving (and/or renaming) is not the same as simply copying and then deleting the original. When moving a file, the link is simply removed from the old parent directory and added to the new parent directory. However, the file itself is untouched (i.e. it has the same inodes and resides at the same place on the disk). For example, you cannot copy a file you cannot read, but you can move (and/or rename) it (provided you have write permission to its old and new parent directories). Also, suppose there is a non-empty directory you do not have write permission to. You cannot delete this directory (since you cannot delete its contents); but you can move (and/or rename) it. Also, since moving between filenames on a single volume does not involve copying, it is faster and does not place strain of lots of reads and writes on the disk. Moving files across different volumes, however, does necessitate copying and deleting.</p>
-</div>
-<div class="section" title="5.2.3. Examples">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="id2947932"></a>5.2.3. Examples</h4></div></div></div>
-<pre class="programlisting">
-$ mv myfile mynewfilename    renames a file
+Report bugs to &lt;bug-coreutils@gnu.org&gt;.
+      </pre>
+     </div>
+    </div>
+    <div class="section" title="5.Basic file handling">
+     <div class="titlepage">
+      <div>
+       <div>
+        <h2 class="title" style="clear: both">
+         <a name="id2626205">
+         </a>
+         5.Basic file handling
+        </h2>
+       </div>
+      </div>
+     </div>
+     <div class="section" title="5.1.cp">
+      <div class="titlepage">
+       <div>
+        <div>
+         <h3 class="title">
+          <a name="id2626214">
+          </a>
+          5.1.cp
+         </h3>
+        </div>
+       </div>
+      </div>
+      <p id="ch9Using_Linux_Tools_81">
+       <span class="emphasis">
+        <em>
+         cp
+        </em>
+       </span>
+       is the command entered in a Unix shell to copy a file from one place to another, possibly on a different filesystem. The original file remains unchanged, and the new file may have the same or a different name.
+      </p>
+      <div class="section" title="5.1.1.Usage">
+       <div class="titlepage">
+        <div>
+         <div>
+          <h4 class="title">
+           <a name="id2626231">
+           </a>
+           5.1.1.Usage
+          </h4>
+         </div>
+        </div>
+       </div>
+       <p id="ch9Using_Linux_Tools_82">
+        To copy a file to another file:
+       </p>
+       <pre class="programlisting">
+        $ cp [ -f ] [ -H ] [ -i ] [ -p ][ -- ] SourceFile TargetFile
+       </pre>
+       <p id="ch9Using_Linux_Tools_83">
+        To copy a file to a directory:
+       </p>
+       <pre class="programlisting">
+        $ cp [ -f ] [ -H ] [ -i ] [ -p ] [ -r | -R ] [ -- ] SourceFile ...              TargetDirectory
+       </pre>
+       <p id="ch9Using_Linux_Tools_84">
+        To copy a directory to a directory:
+       </p>
+       <pre class="programlisting">
+        $ cp [ -f ] [ -H ] [ -i ] [ -p ] [ -- ] { -r | -R }
+SourceDirectory ... TargetDirectory
+       </pre>
+      </div>
+      <div class="section" title="5.1.2.Flags">
+       <div class="titlepage">
+        <div>
+         <div>
+          <h4 class="title">
+           <a name="id2626266">
+           </a>
+           5.1.2.Flags
+          </h4>
+         </div>
+        </div>
+       </div>
+       <p id="ch9Using_Linux_Tools_85">
+        <span class="emphasis">
+         <em>
+          -f
+         </em>
+        </span>
+        (force)  specifies removal of the target file if it cannot be opened for write operations. The removal precedes any copying performed by the cp command.
+       </p>
+       <p id="ch9Using_Linux_Tools_86">
+        <span class="emphasis">
+         <em>
+          -P
+         </em>
+        </span>
+        makes the cp command copy symbolic links. The default is to follow symbolic links, that is, to copy files to which symbolic links point.
+       </p>
+       <p id="ch9Using_Linux_Tools_87">
+        <span class="emphasis">
+         <em>
+          -i
+         </em>
+        </span>
+        (interactive)  prompts you with the name of a file to be overwritten. This occurs if the TargetDirectory or TargetFile parameter contains a file with the same name as a file specified in the SourceFile or SourceDirectory parameter. If you enter y or the locale's equivalent of y, the cp command continues. Any other answer prevents the cp command from overwriting the file.
+       </p>
+       <p id="ch9Using_Linux_Tools_88">
+        <span class="emphasis">
+         <em>
+          -p
+         </em>
+        </span>
+        (preserve)  duplicates the following characteristics of each SourceFile/SourceDirectory in the corresponding TargetFile and/or TargetDirectory:
+       </p>
+       <div class="itemizedlist">
+        <ul class="itemizedlist" type="*">
+         <li class="listitem" style="list-style-type: *">
+          <p id="ch9Using_Linux_Tools_89">
+           The time of the last data modification and the time of the last access.
+          </p>
+         </li>
+         <li class="listitem" style="list-style-type: *">
+          <p id="ch9Using_Linux_Tools_8a">
+           The user ID and group ID (only if it has permissions to do this)
+          </p>
+         </li>
+         <li class="listitem" style="list-style-type: *">
+          <p id="ch9Using_Linux_Tools_8b">
+           The file permission bits and the SUID and SGID bits.
+          </p>
+         </li>
+        </ul>
+       </div>
+       <p id="ch9Using_Linux_Tools_8c">
+        <span class="emphasis">
+         <em>
+          -R
+         </em>
+        </span>
+        (recursive)  copy directories (recursively copying all the contents)
+       </p>
+      </div>
+      <div class="section" title="5.1.3.Examples">
+       <div class="titlepage">
+        <div>
+         <div>
+          <h4 class="title">
+           <a name="id2626363">
+           </a>
+           5.1.3.Examples
+          </h4>
+         </div>
+        </div>
+       </div>
+       <p id="ch9Using_Linux_Tools_8d">
+        To make a copy of a file in the current directory, enter:
+       </p>
+       <pre class="programlisting">
+        $ cp prog.c prog.bak
+       </pre>
+       <p id="ch9Using_Linux_Tools_8e">
+        This copies prog.c to prog.bak. If the prog.bak file does not already exist, the cp command creates it. If it does exist, the cp command replaces it with a copy of the prog.c file.
+       </p>
+       <p id="ch9Using_Linux_Tools_8f">
+        To copy a file in your current directory into another directory, enter:
+       </p>
+       <pre class="programlisting">
+        $ cp zaphod /home/books/hhgg
+       </pre>
+       <p id="ch9Using_Linux_Tools_90">
+        This copies the jones file to /home/books/hhgg/zaphod.
+       </p>
+       <p id="ch9Using_Linux_Tools_91">
+        To copy a file to a new file and preserve the modification date, time, and access control list associated with the source file, enter:
+       </p>
+       <pre class="programlisting">
+        $ cp -p martin_luther_king martin_luther_king.jr
+       </pre>
+       <p id="ch9Using_Linux_Tools_92">
+        This copies the
+        <span class="emphasis">
+         <em>
+          martin_luther_king
+         </em>
+        </span>
+        file to the
+        <span class="emphasis">
+         <em>
+          martin_luther_king.jr
+         </em>
+        </span>
+        file. Instead of creating the file with the current date and time stamp, the system gives the
+        <span class="emphasis">
+         <em>
+          martin_luther_king.jr
+         </em>
+        </span>
+        file the same date and time as the
+        <span class="emphasis">
+         <em>
+          martin_luther_king
+         </em>
+        </span>
+        file. The
+        <span class="emphasis">
+         <em>
+          martin_luther_king.jr
+         </em>
+        </span>
+        file also inherits the
+        <span class="emphasis">
+         <em>
+          martin_luther_king
+         </em>
+        </span>
+        file's access control protection.
+       </p>
+       <p id="ch9Using_Linux_Tools_93">
+        To copy all the files in a directory to a new directory, enter:
+       </p>
+       <pre class="programlisting">
+        $ cp /home/galactica/clients/* /home/hhgg/customers
+       </pre>
+       <p id="ch9Using_Linux_Tools_94">
+        This copies only the files in the clients directory to the customers directory.
+       </p>
+       <p id="ch9Using_Linux_Tools_95">
+        To copy a directory, including all its files and subdirectories, to another directory, enter:
+       </p>
+       <p id="ch9Using_Linux_Tools_96">
+        $ cp -R /home/hhgg/clients /home/hhgg/customers
+       </p>
+       <p id="ch9Using_Linux_Tools_97">
+        This copies the clients directory, including all its files, subdirectories, and the files in those subdirectories, to the customers/clients directory.
+       </p>
+       <p id="ch9Using_Linux_Tools_98">
+        To copy a specific set of files of any extension to another directory, enter:
+       </p>
+       <pre class="programlisting">
+        $ cp zaphod arthur ford /home/hhgg/clients
+       </pre>
+       <p id="ch9Using_Linux_Tools_99">
+        This copies the
+        <span class="emphasis">
+         <em>
+          zaphod
+         </em>
+        </span>
+        ,
+        <span class="emphasis">
+         <em>
+          arthur
+         </em>
+        </span>
+        , and
+        <span class="emphasis">
+         <em>
+          ford
+         </em>
+        </span>
+        files in your current working directory to the /home/hhgg/clients directory.
+       </p>
+       <p id="ch9Using_Linux_Tools_9a">
+        To use pattern-matching characters to copy files, enter:
+       </p>
+       <pre class="programlisting">
+        $ cp programs/*.py .
+       </pre>
+       <p id="ch9Using_Linux_Tools_9b">
+        This copies the files in the programs directory that end with
+        <span class="emphasis">
+         <em>
+          .py
+         </em>
+        </span>
+        to the current directory, signified by the single "." (dot). You must type a space between the
+        <span class="emphasis">
+         <em>
+          py
+         </em>
+        </span>
+        and the final dot.
+       </p>
+      </div>
+     </div>
+     <div class="section" title="5.2.mv">
+      <div class="titlepage">
+       <div>
+        <div>
+         <h3 class="title">
+          <a name="id2626526">
+          </a>
+          5.2.mv
+         </h3>
+        </div>
+       </div>
+      </div>
+      <p id="ch9Using_Linux_Tools_9c">
+       <span class="emphasis">
+        <em>
+         mv
+        </em>
+       </span>
+       (short for move) is a Unix command that moves one or more files or directories from one place to another. The original file is deleted, and the new file may have the same or a different name. If possible (i.e. when the original and new files are on the same file system),
+       <span class="emphasis">
+        <em>
+         mv
+        </em>
+       </span>
+       will rename the file instead. Write permission is required on all directories being modified.
+      </p>
+      <div class="section" title="5.2.1.Conflicting existing file">
+       <div class="titlepage">
+        <div>
+         <div>
+          <h4 class="title">
+           <a name="id2626550">
+           </a>
+           5.2.1.Conflicting existing file
+          </h4>
+         </div>
+        </div>
+       </div>
+       <p id="ch9Using_Linux_Tools_9d">
+        In all cases, when a file is moved to have the name of an existing file (in the same directory), the existing file is deleted. If the existing file is not writable but is in a directory that is writable, then the mv command asks for confirmation if possible (i.e. if run from a terminal) before proceeding, unless the -f (force) option is used.
+       </p>
+      </div>
+      <div class="section" title="5.2.2.Differences with copy and delete">
+       <div class="titlepage">
+        <div>
+         <div>
+          <h4 class="title">
+           <a name="id2626570">
+           </a>
+           5.2.2.Differences with copy and delete
+          </h4>
+         </div>
+        </div>
+       </div>
+       <p id="ch9Using_Linux_Tools_9e">
+        Note that, usually, when moving files within the same volume, moving (and/or renaming) is not the same as simply copying and then deleting the original. When moving a file, the link is simply removed from the old parent directory and added to the new parent directory. However, the file itself is untouched (i.e. it has the same inodes and resides at the same place on the disk). For example, you cannot copy a file you cannot read, but you can move (and/or rename) it (provided you have write permission to its old and new parent directories). Also, suppose there is a non-empty directory you do not have write permission to. You cannot delete this directory (since you cannot delete its contents); but you can move (and/or rename) it. Also, since moving between filenames on a single volume does not involve copying, it is faster and does not place strain of lots of reads and writes on the disk. Moving files across different volumes, however, does necessitate copying and deleting.
+       </p>
+      </div>
+      <div class="section" title="5.2.3.Examples">
+       <div class="titlepage">
+        <div>
+         <div>
+          <h4 class="title">
+           <a name="id2626600">
+           </a>
+           5.2.3.Examples
+          </h4>
+         </div>
+        </div>
+       </div>
+       <pre class="programlisting">
+        $ mv myfile mynewfilename    renames a file
 $ mv myfile otherfilename    renames a file and deletes the existing            file "myfile"
 $ mv myfile /myfile          moves 'myfile' from the current            directory to the root directory
 $ mv myfile dir/myfile       moves 'myfile' to 'dir/myfile' relative            to the current directory
@@ -604,213 +2638,829 @@
 $ mv myfile dir/myfile2      moves 'myfile' to dir and renames it to            'myfile2'
 $ mv foo bar baz dir         moves multiple files to directory dir
 $ mv --help                  shows a very concise help about the                syntax of the command
-$ man mv                     prints an extensive user manual for                'mv' in the terminal</pre>
-<p><a name="ch9Using_Linux_Tools_9f"></a>In all cases, the file or files being moved or renamed can be a directory.</p>
-<p><a name="ch9Using_Linux_Tools_a0"></a>Note that when the command is called with two arguments (as <span class="emphasis"><em>mv name1 name2</em></span> or <span class="emphasis"><em>mv name1 /dir/name2</em></span>), it can have three different effects, depending on whether <span class="emphasis"><em>name2</em></span> does not exist, is an existing file, or is an existing directory. If the user intends to refer to an existing directory, <span class="emphasis"><em>/.</em></span> (or in some Unix versions <span class="emphasis"><em>/</em></span> is sufficient) may be appended to the name to force the system to check this. To move a file to a new directory, the directory must be created first.</p>
-</div>
-</div>
-<div class="section" title="5.3. rm">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="id2947990"></a>5.3. rm</h3></div></div></div>
-<p><a name="ch9Using_Linux_Tools_a1"></a><span class="emphasis"><em>rm</em></span> (short for "remove") is one of several basic Unix command lines that operates on files. It is used to delete files from a filesystem. The data is not actually destroyed. Only the index listing where the file is stored is destroyed, and the storage is made available for reuse. There are undelete utilities that will attempt to reconstruct the index and can bring the file back if the parts were not reused.</p>
-<p><a name="ch9Using_Linux_Tools_a2"></a>Here's example to remove a file named "foo" from a directory, here shown with the -i option:</p>
-<pre class="programlisting">
-$ rm -i foo
-remove foo? y</pre>
-<div class="section" title="5.3.1. Options">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="id2948020"></a>5.3.1. Options</h4></div></div></div>
-<p><a name="ch9Using_Linux_Tools_a3"></a>Common options that rm accepts include:</p>
-<div class="itemizedlist"><ul class="itemizedlist" type="*">
-<li class="listitem" style="list-style-type: *"><p><a name="ch9Using_Linux_Tools_a4"></a><span class="emphasis"><em>-r</em></span>, which removes directories, removing the contents recursively beforehand (so as not to leave files without a directory to reside in) ("recursive")</p></li>
-<li class="listitem" style="list-style-type: *"><p><a name="ch9Using_Linux_Tools_a5"></a><span class="emphasis"><em>-i</em></span>, which asks for every deletion to be confirmed ("interactive")</p></li>
-<li class="listitem" style="list-style-type: *"><p><a name="ch9Using_Linux_Tools_a6"></a><span class="emphasis"><em>-f</em></span>, which ignores non-existent files and overrides any confirmation prompts ("force")</p></li>
-<li class="listitem" style="list-style-type: *"><p><a name="ch9Using_Linux_Tools_a7"></a><span class="emphasis"><em>-v</em></span>, which shows what is being removed as it happens ("verbose")</p></li>
-</ul></div>
-<p><a name="ch9Using_Linux_Tools_a8"></a><span class="emphasis"><em>rm</em></span> is often aliased to "rm -i" so as to avoid accidental deletion of files. If a user still wishes to delete a large number of files without confirmation, they can manually cancel out the -i argument by adding the -f option (as the option specified later on the expanded command line "rm -i -f" takes precedence).</p>
-<p><a name="ch9Using_Linux_Tools_a9"></a><span class="emphasis"><em>rm -rf</em></span> (variously, rm -rf /, rm -rf *, and others) is frequently used in jokes and anecdotes about Unix disasters. The rm -rf variant of the command, if run by a superuser on the root directory, would cause the contents of every writable mounted filesystem on the computer to be deleted.</p>
-<p><a name="ch9Using_Linux_Tools_aa"></a><span class="emphasis"><em>rm</em></span> is often used in conjunction with xargs to supply a list of files to delete:</p>
-<pre class="programlisting">
-xargs rm &lt; filelist</pre>
-<p><a name="ch9Using_Linux_Tools_ab"></a>When <span class="emphasis"><em>rm</em></span> is used on a symbolic link, it deletes the link, but does not affect the target of the link.</p>
-</div>
-<div class="section" title="5.3.2. Permissions">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="id2948118"></a>5.3.2. Permissions</h4></div></div></div>
-<p><a name="ch9Using_Linux_Tools_ac"></a>Usually, on most filesystems, deleting a file requires write permission on the parent directory (and execute permission, in order to enter the directory in the first place). (Note that, confusingly for beginners, permissions on the file itself are irrelevant. However, GNU rm asks for confirmation if a write-protected file is to be deleted, unless the -f option is used.)</p>
-<p><a name="ch9Using_Linux_Tools_ad"></a>To delete a directory (with rm -r), one must delete all of its contents recursively. This requires that one must have read and write and execute permission to that directory (if it's not empty) and all non-empty subdirectories recursively (if there are any). The read permissions are needed to list the contents of the directory in order to delete them. This sometimes leads to an odd situation where a non-empty directory cannot be deleted because one doesn't have write permission to it and so cannot delete its contents; but if the same directory were empty, one would be able to delete it.</p>
-<p><a name="ch9Using_Linux_Tools_ae"></a>If a file resides in a directory with the sticky bit set, then deleting the file requires one to be the owner of the file.</p>
-</div>
-</div>
-</div>
-<div class="section" title="6. Command Line Arguments">
-<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="id2948158"></a>6. Command Line Arguments</h2></div></div></div>
-<p><a name="ch9Using_Linux_Tools_af"></a>In computer command line interfaces, a command line argument is an argument sent to a program being called. In general, a program can take any number of command line arguments, which may be necessary for the program to run, or may even be ignored, depending on the function of that program.</p>
-<p><a name="ch9Using_Linux_Tools_b0"></a>For example, in Unix and Unix-like environments, an example of a command-line argument is:</p>
-<pre class="programlisting">
-rm file.s</pre>
-<p><a name="ch9Using_Linux_Tools_b1"></a>"file.s" is a command line argument which tells the program rm to remove the file "file.s".</p>
-<p><a name="ch9Using_Linux_Tools_b2"></a>Programming languages such as C, C++ and Java allow a program to interpret the command line arguments by handling them as string parameters in the main function.</p>
-<p><a name="ch9Using_Linux_Tools_b3"></a>A command line option or simply <span class="emphasis"><em>option</em></span> (also known as a command line parameter, flag, or a switch) is an indication by a user that a computer program should change its default output.</p>
-<p><a name="ch9Using_Linux_Tools_b4"></a>Long options are introduced via "--", and are typically whole words. For example, <span class="emphasis"><em>ls --long --classify --all</em></span>. Arguments to long options are provided with "=", as <span class="emphasis"><em>ls --block-size=1024</em></span>. Some Unix programs use long options with single dashes, for example MPlayer as in <span class="emphasis"><em>mplayer -nosound</em></span>.</p>
-<p><a name="ch9Using_Linux_Tools_b5"></a>Linux also uses "--" to terminate option lists. For example, an attempt to delete a file called <span class="emphasis"><em>-file1</em></span> by using <span class="emphasis"><em>rm -file1</em></span> may produce an error, since rm may interpret <span class="emphasis"><em>-file1</em></span> as a command line switch. Using <span class="emphasis"><em>rm -- -file1</em></span> removes ambiguity.</p>
-</div>
-<div class="section" title="7. Basic Text Processing">
-<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="id2948251"></a>7. Basic Text Processing</h2></div></div></div>
-<div class="section" title="7.1. head">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="id2948260"></a>7.1. head</h3></div></div></div>
-<p><a name="ch9Using_Linux_Tools_b6"></a><span class="emphasis"><em>head</em></span> is a program on Unix and Unix-like systems used to display the first few lines of a text file or piped data. The command syntax is:</p>
-<pre class="programlisting">
-$ head [options] &lt;file_name&gt;</pre>
-<p><a name="ch9Using_Linux_Tools_b7"></a>By default, <span class="emphasis"><em>head</em></span> will print the first 10 lines of its input to the standard output. The number of lines printed may be changed with a command line option. The following example shows the first 20 lines of filename:</p>
-<pre class="programlisting">
-$ head -n 20 filename</pre>
-<p><a name="ch9Using_Linux_Tools_b8"></a>This displays the first 5 lines of all files starting with <span class="emphasis"><em>foo</em></span>:</p>
-<pre class="programlisting">
-$ head -n 5 foo*</pre>
-<p><a name="ch9Using_Linux_Tools_b9"></a>Some versions omit the n and just let you say -5.</p>
-<div class="section" title="7.1.1. Flags">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="id2948311"></a>7.1.1. Flags</h4></div></div></div>
-<pre class="programlisting">
--c &lt;x number of bytes&gt; Copy first x number of bytes.</pre>
-<p><a name="ch9Using_Linux_Tools_ba"></a>Other options: <span class="emphasis"><em>sed</em></span></p>
-<p><a name="ch9Using_Linux_Tools_bb"></a>Many early versions of Unix did not have this command, and so documentation and books had <span class="emphasis"><em>sed</em></span> do this job:</p>
-<pre class="programlisting">
-sed 5q foo</pre>
-<p><a name="ch9Using_Linux_Tools_bc"></a>This says to print every line (implicit), and quit after the fifth.</p>
-</div>
-</div>
-<div class="section" title="7.2. tail">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="id2948347"></a>7.2. tail</h3></div></div></div>
-<p><a name="ch9Using_Linux_Tools_bd"></a><span class="emphasis"><em>tail</em></span> is a program on Unix and Unix-like systems used to display the last few lines of a text file or piped data.</p>
-<p><a name="ch9Using_Linux_Tools_be"></a>The command-syntax is:</p>
-<pre class="programlisting">
-$ tail [options] &lt;file_name&gt;</pre>
-<p><a name="ch9Using_Linux_Tools_bf"></a>By default, <span class="emphasis"><em>tail</em></span> will print the last 10 lines of its input to the standard output. With command line options the number of lines printed and the printing units (lines, blocks or bytes) may be changed. The following example shows the last 20 lines of filename:</p>
-<pre class="programlisting">
-$ tail -n 20 filename</pre>
-<p><a name="ch9Using_Linux_Tools_c0"></a>This example shows the last 15 bytes of all files starting with <span class="emphasis"><em>foo</em></span>:</p>
-<pre class="programlisting">
-$ tail -c 15 foo*</pre>
-<p><a name="ch9Using_Linux_Tools_c1"></a>This example shows all lines of filename from the second line onwards:</p>
-<pre class="programlisting">
-$ tail -n +2 filename</pre>
-<p><a name="ch9Using_Linux_Tools_c2"></a>Using an older syntax (still used in Sun Solaris as the -n option is not supported), the last 20 lines and the last 50 bytes of filename can be shown with the following command:</p>
-<pre class="programlisting">
-$ tail -20 filename
-$ tail -50c filename</pre>
-<p><a name="ch9Using_Linux_Tools_c3"></a>However this syntax is now obsolete and does not conform with the POSIX 1003.1-2001 standard. Even if still supported in current versions, when used with other options (like -f, see below), these switches could not work at all.</p>
-<div class="section" title="7.2.1. File monitoring">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="id2948426"></a>7.2.1. File monitoring</h4></div></div></div>
-<p><a name="ch9Using_Linux_Tools_c4"></a><span class="emphasis"><em>tail</em></span> has a special command line option <span class="emphasis"><em>-f</em></span> (follow) that allows a file to be monitored. Instead of displaying the last few lines and exiting, tail displays the lines and then monitors the file. As new lines are added to the file by another process, tail updates the display. This is particularly useful for monitoring log files. The following command will display the last 10 lines of messages and append new lines to the display as new lines are added to messages:</p>
-<pre class="programlisting">
-$ tail -f /var/adm/messages</pre>
-<p><a name="ch9Using_Linux_Tools_c5"></a>To interrupt tail while it is monitoring, break-in with <span class="emphasis"><em>Ctrl+C</em></span>. This command can be run "in the background" with &amp;, see job control.</p>
-<p><a name="ch9Using_Linux_Tools_c6"></a>If you have a command's result to monitor, you can use the <span class="emphasis"><em>watch</em></span> command.</p>
-</div>
-</div>
-<div class="section" title="7.3. cut">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="id2948475"></a>7.3. cut</h3></div></div></div>
-<p><a name="ch9Using_Linux_Tools_c7"></a>In computing, <span class="emphasis"><em>cut</em></span> is a Unix command line utility which is used to extract sections from each line of input — usually from a file.</p>
-<p><a name="ch9Using_Linux_Tools_c8"></a>Extraction of line segments can typically be done by <span class="emphasis"><em>bytes (-b), characters (-c)</em></span>, or <span class="emphasis"><em>fields (-f)</em></span> separated by a <span class="emphasis"><em>delimiter (-d — the tab character by default)</em></span>. A range must be provided in each case which consists of one of N, N-M, N- (N to the end of the line), or -M (beginning of the line to M), where N and M are counted from 1 (there is no zeroth value). Since version 6, an error is thrown if you include a zeroth value. Prior to this the value was ignored and assumed to be 1.</p>
-<p><a name="ch9Using_Linux_Tools_c9"></a>Assuming a file named file containing the lines:</p>
-<pre class="programlisting">
-foo:bar:baz:qux:quux
+$ man mv                     prints an extensive user manual for                'mv' in the terminal
+       </pre>
+       <p id="ch9Using_Linux_Tools_9f">
+        In all cases, the file or files being moved or renamed can be a directory.
+       </p>
+       <p id="ch9Using_Linux_Tools_a0">
+        Note that when the command is called with two arguments (as
+        <span class="emphasis">
+         <em>
+          mv name1 name2
+         </em>
+        </span>
+        or
+        <span class="emphasis">
+         <em>
+          mv name1 /dir/name2
+         </em>
+        </span>
+        ), it can have three different effects, depending on whether
+        <span class="emphasis">
+         <em>
+          name2
+         </em>
+        </span>
+        does not exist, is an existing file, or is an existing directory. If the user intends to refer to an existing directory,
+        <span class="emphasis">
+         <em>
+          /.
+         </em>
+        </span>
+        (or in some Unix versions
+        <span class="emphasis">
+         <em>
+          /
+         </em>
+        </span>
+        is sufficient) may be appended to the name to force the system to check this. To move a file to a new directory, the directory must be created first.
+       </p>
+      </div>
+     </div>
+     <div class="section" title="5.3.rm">
+      <div class="titlepage">
+       <div>
+        <div>
+         <h3 class="title">
+          <a name="id2626659">
+          </a>
+          5.3.rm
+         </h3>
+        </div>
+       </div>
+      </div>
+      <p id="ch9Using_Linux_Tools_a1">
+       <span class="emphasis">
+        <em>
+         rm
+        </em>
+       </span>
+       (short for "remove") is one of several basic Unix command lines that operates on files. It is used to delete files from a filesystem. The data is not actually destroyed. Only the index listing where the file is stored is destroyed, and the storage is made available for reuse. There are undelete utilities that will attempt to reconstruct the index and can bring the file back if the parts were not reused.
+      </p>
+      <p id="ch9Using_Linux_Tools_a2">
+       Here's example to remove a file named "foo" from a directory, here shown with the -i option:
+      </p>
+      <pre class="programlisting">
+       $ rm -i foo
+remove foo? y
+      </pre>
+      <div class="section" title="5.3.1.Options">
+       <div class="titlepage">
+        <div>
+         <div>
+          <h4 class="title">
+           <a name="id2626689">
+           </a>
+           5.3.1.Options
+          </h4>
+         </div>
+        </div>
+       </div>
+       <p id="ch9Using_Linux_Tools_a3">
+        Common options that rm accepts include:
+       </p>
+       <div class="itemizedlist">
+        <ul class="itemizedlist" type="*">
+         <li class="listitem" style="list-style-type: *">
+          <p id="ch9Using_Linux_Tools_a4">
+           <span class="emphasis">
+            <em>
+             -r
+            </em>
+           </span>
+           , which removes directories, removing the contents recursively beforehand (so as not to leave files without a directory to reside in) ("recursive")
+          </p>
+         </li>
+         <li class="listitem" style="list-style-type: *">
+          <p id="ch9Using_Linux_Tools_a5">
+           <span class="emphasis">
+            <em>
+             -i
+            </em>
+           </span>
+           , which asks for every deletion to be confirmed ("interactive")
+          </p>
+         </li>
+         <li class="listitem" style="list-style-type: *">
+          <p id="ch9Using_Linux_Tools_a6">
+           <span class="emphasis">
+            <em>
+             -f
+            </em>
+           </span>
+           , which ignores non-existent files and overrides any confirmation prompts ("force")
+          </p>
+         </li>
+         <li class="listitem" style="list-style-type: *">
+          <p id="ch9Using_Linux_Tools_a7">
+           <span class="emphasis">
+            <em>
+             -v
+            </em>
+           </span>
+           , which shows what is being removed as it happens ("verbose")
+          </p>
+         </li>
+        </ul>
+       </div>
+       <p id="ch9Using_Linux_Tools_a8">
+        <span class="emphasis">
+         <em>
+          rm
+         </em>
+        </span>
+        is often aliased to "rm -i" so as to avoid accidental deletion of files. If a user still wishes to delete a large number of files without confirmation, they can manually cancel out the -i argument by adding the -f option (as the option specified later on the expanded command line "rm -i -f" takes precedence).
+       </p>
+       <p id="ch9Using_Linux_Tools_a9">
+        <span class="emphasis">
+         <em>
+          rm -rf
+         </em>
+        </span>
+        (variously, rm -rf /, rm -rf *, and others) is frequently used in jokes and anecdotes about Unix disasters. The rm -rf variant of the command, if run by a superuser on the root directory, would cause the contents of every writable mounted filesystem on the computer to be deleted.
+       </p>
+       <p id="ch9Using_Linux_Tools_aa">
+        <span class="emphasis">
+         <em>
+          rm
+         </em>
+        </span>
+        is often used in conjunction with xargs to supply a list of files to delete:
+       </p>
+       <pre class="programlisting">
+        xargs rm &lt; filelist
+       </pre>
+       <p id="ch9Using_Linux_Tools_ab">
+        When
+        <span class="emphasis">
+         <em>
+          rm
+         </em>
+        </span>
+        is used on a symbolic link, it deletes the link, but does not affect the target of the link.
+       </p>
+      </div>
+      <div class="section" title="5.3.2.Permissions">
+       <div class="titlepage">
+        <div>
+         <div>
+          <h4 class="title">
+           <a name="id2626787">
+           </a>
+           5.3.2.Permissions
+          </h4>
+         </div>
+        </div>
+       </div>
+       <p id="ch9Using_Linux_Tools_ac">
+        Usually, on most filesystems, deleting a file requires write permission on the parent directory (and execute permission, in order to enter the directory in the first place). (Note that, confusingly for beginners, permissions on the file itself are irrelevant. However, GNU rm asks for confirmation if a write-protected file is to be deleted, unless the -f option is used.)
+       </p>
+       <p id="ch9Using_Linux_Tools_ad">
+        To delete a directory (with rm -r), one must delete all of its contents recursively. This requires that one must have read and write and execute permission to that directory (if it's not empty) and all non-empty subdirectories recursively (if there are any). The read permissions are needed to list the contents of the directory in order to delete them. This sometimes leads to an odd situation where a non-empty directory cannot be deleted because one doesn't have write permission to it and so cannot delete its contents; but if the same directory were empty, one would be able to delete it.
+       </p>
+       <p id="ch9Using_Linux_Tools_ae">
+        If a file resides in a directory with the sticky bit set, then deleting the file requires one to be the owner of the file.
+       </p>
+      </div>
+     </div>
+    </div>
+    <div class="section" title="6.Command Line Arguments">
+     <div class="titlepage">
+      <div>
+       <div>
+        <h2 class="title" style="clear: both">
+         <a name="id2626827">
+         </a>
+         6.Command Line Arguments
+        </h2>
+       </div>
+      </div>
+     </div>
+     <p id="ch9Using_Linux_Tools_af">
+      In computer command line interfaces, a command line argument is an argument sent to a program being called. In general, a program can take any number of command line arguments, which may be necessary for the program to run, or may even be ignored, depending on the function of that program.
+     </p>
+     <p id="ch9Using_Linux_Tools_b0">
+      For example, in Unix and Unix-like environments, an example of a command-line argument is:
+     </p>
+     <pre class="programlisting">
+      rm file.s
+     </pre>
+     <p id="ch9Using_Linux_Tools_b1">
+      "file.s" is a command line argument which tells the program rm to remove the file "file.s".
+     </p>
+     <p id="ch9Using_Linux_Tools_b2">
+      Programming languages such as C, C++ and Java allow a program to interpret the command line arguments by handling them as string parameters in the main function.
+     </p>
+     <p id="ch9Using_Linux_Tools_b3">
+      A command line option or simply
+      <span class="emphasis">
+       <em>
+        option
+       </em>
+      </span>
+      (also known as a command line parameter, flag, or a switch) is an indication by a user that a computer program should change its default output.
+     </p>
+     <p id="ch9Using_Linux_Tools_b4">
+      Long options are introduced via "--", and are typically whole words. For example,
+      <span class="emphasis">
+       <em>
+        ls --long --classify --all
+       </em>
+      </span>
+      . Arguments to long options are provided with "=", as
+      <span class="emphasis">
+       <em>
+        ls --block-size=1024
+       </em>
+      </span>
+      . Some Unix programs use long options with single dashes, for example MPlayer as in
+      <span class="emphasis">
+       <em>
+        mplayer -nosound
+       </em>
+      </span>
+      .
+     </p>
+     <p id="ch9Using_Linux_Tools_b5">
+      Linux also uses "--" to terminate option lists. For example, an attempt to delete a file called
+      <span class="emphasis">
+       <em>
+        -file1
+       </em>
+      </span>
+      by using
+      <span class="emphasis">
+       <em>
+        rm -file1
+       </em>
+      </span>
+      may produce an error, since rm may interpret
+      <span class="emphasis">
+       <em>
+        -file1
+       </em>
+      </span>
+      as a command line switch. Using
+      <span class="emphasis">
+       <em>
+        rm -- -file1
+       </em>
+      </span>
+      removes ambiguity.
+     </p>
+    </div>
+    <div class="section" title="7.Basic Text Processing">
+     <div class="titlepage">
+      <div>
+       <div>
+        <h2 class="title" style="clear: both">
+         <a name="id2626920">
+         </a>
+         7.Basic Text Processing
+        </h2>
+       </div>
+      </div>
+     </div>
+     <div class="section" title="7.1.head">
+      <div class="titlepage">
+       <div>
+        <div>
+         <h3 class="title">
+          <a name="id2626929">
+          </a>
+          7.1.head
+         </h3>
+        </div>
+       </div>
+      </div>
+      <p id="ch9Using_Linux_Tools_b6">
+       <span class="emphasis">
+        <em>
+         head
+        </em>
+       </span>
+       is a program on Unix and Unix-like systems used to display the first few lines of a text file or piped data. The command syntax is:
+      </p>
+      <pre class="programlisting">
+       $ head [options] &lt;file_name&gt;
+      </pre>
+      <p id="ch9Using_Linux_Tools_b7">
+       By default,
+       <span class="emphasis">
+        <em>
+         head
+        </em>
+       </span>
+       will print the first 10 lines of its input to the standard output. The number of lines printed may be changed with a command line option. The following example shows the first 20 lines of filename:
+      </p>
+      <pre class="programlisting">
+       $ head -n 20 filename
+      </pre>
+      <p id="ch9Using_Linux_Tools_b8">
+       This displays the first 5 lines of all files starting with
+       <span class="emphasis">
+        <em>
+         foo
+        </em>
+       </span>
+       :
+      </p>
+      <pre class="programlisting">
+       $ head -n 5 foo*
+      </pre>
+      <p id="ch9Using_Linux_Tools_b9">
+       Some versions omit the n and just let you say -5.
+      </p>
+      <div class="section" title="7.1.1.Flags">
+       <div class="titlepage">
+        <div>
+         <div>
+          <h4 class="title">
+           <a name="id2626980">
+           </a>
+           7.1.1.Flags
+          </h4>
+         </div>
+        </div>
+       </div>
+       <pre class="programlisting">
+        -c &lt;x number of bytes&gt; Copy first x number of bytes.
+       </pre>
+       <p id="ch9Using_Linux_Tools_ba">
+        Other options:
+        <span class="emphasis">
+         <em>
+          sed
+         </em>
+        </span>
+       </p>
+       <p id="ch9Using_Linux_Tools_bb">
+        Many early versions of Unix did not have this command, and so documentation and books had
+        <span class="emphasis">
+         <em>
+          sed
+         </em>
+        </span>
+        do this job:
+       </p>
+       <pre class="programlisting">
+        sed 5q foo
+       </pre>
+       <p id="ch9Using_Linux_Tools_bc">
+        This says to print every line (implicit), and quit after the fifth.
+       </p>
+      </div>
+     </div>
+     <div class="section" title="7.2.tail">
+      <div class="titlepage">
+       <div>
+        <div>
+         <h3 class="title">
+          <a name="id2627016">
+          </a>
+          7.2.tail
+         </h3>
+        </div>
+       </div>
+      </div>
+      <p id="ch9Using_Linux_Tools_bd">
+       <span class="emphasis">
+        <em>
+         tail
+        </em>
+       </span>
+       is a program on Unix and Unix-like systems used to display the last few lines of a text file or piped data.
+      </p>
+      <p id="ch9Using_Linux_Tools_be">
+       The command-syntax is:
+      </p>
+      <pre class="programlisting">
+       $ tail [options] &lt;file_name&gt;
+      </pre>
+      <p id="ch9Using_Linux_Tools_bf">
+       By default,
+       <span class="emphasis">
+        <em>
+         tail
+        </em>
+       </span>
+       will print the last 10 lines of its input to the standard output. With command line options the number of lines printed and the printing units (lines, blocks or bytes) may be changed. The following example shows the last 20 lines of filename:
+      </p>
+      <pre class="programlisting">
+       $ tail -n 20 filename
+      </pre>
+      <p id="ch9Using_Linux_Tools_c0">
+       This example shows the last 15 bytes of all files starting with
+       <span class="emphasis">
+        <em>
+         foo
+        </em>
+       </span>
+       :
+      </p>
+      <pre class="programlisting">
+       $ tail -c 15 foo*
+      </pre>
+      <p id="ch9Using_Linux_Tools_c1">
+       This example shows all lines of filename from the second line onwards:
+      </p>
+      <pre class="programlisting">
+       $ tail -n +2 filename
+      </pre>
+      <p id="ch9Using_Linux_Tools_c2">
+       Using an older syntax (still used in Sun Solaris as the -n option is not supported), the last 20 lines and the last 50 bytes of filename can be shown with the following command:
+      </p>
+      <pre class="programlisting">
+       $ tail -20 filename
+$ tail -50c filename
+      </pre>
+      <p id="ch9Using_Linux_Tools_c3">
+       However this syntax is now obsolete and does not conform with the POSIX 1003.1-2001 standard. Even if still supported in current versions, when used with other options (like -f, see below), these switches could not work at all.
+      </p>
+      <div class="section" title="7.2.1.File monitoring">
+       <div class="titlepage">
+        <div>
+         <div>
+          <h4 class="title">
+           <a name="id2627095">
+           </a>
+           7.2.1.File monitoring
+          </h4>
+         </div>
+        </div>
+       </div>
+       <p id="ch9Using_Linux_Tools_c4">
+        <span class="emphasis">
+         <em>
+          tail
+         </em>
+        </span>
+        has a special command line option
+        <span class="emphasis">
+         <em>
+          -f
+         </em>
+        </span>
+        (follow) that allows a file to be monitored. Instead of displaying the last few lines and exiting, tail displays the lines and then monitors the file. As new lines are added to the file by another process, tail updates the display. This is particularly useful for monitoring log files. The following command will display the last 10 lines of messages and append new lines to the display as new lines are added to messages:
+       </p>
+       <pre class="programlisting">
+        $ tail -f /var/adm/messages
+       </pre>
+       <p id="ch9Using_Linux_Tools_c5">
+        To interrupt tail while it is monitoring, break-in with
+        <span class="emphasis">
+         <em>
+          Ctrl+C
+         </em>
+        </span>
+        . This command can be run "in the background" with &amp;, see job control.
+       </p>
+       <p id="ch9Using_Linux_Tools_c6">
+        If you have a command's result to monitor, you can use the
+        <span class="emphasis">
+         <em>
+          watch
+         </em>
+        </span>
+        command.
+       </p>
+      </div>
+     </div>
+     <div class="section" title="7.3.cut">
+      <div class="titlepage">
+       <div>
+        <div>
+         <h3 class="title">
+          <a name="id2627144">
+          </a>
+          7.3.cut
+         </h3>
+        </div>
+       </div>
+      </div>
+      <p id="ch9Using_Linux_Tools_c7">
+       In computing,
+       <span class="emphasis">
+        <em>
+         cut
+        </em>
+       </span>
+       is a Unix command line utility which is used to extract sections from each line of input  usually from a file.
+      </p>
+      <p id="ch9Using_Linux_Tools_c8">
+       Extraction of line segments can typically be done by
+       <span class="emphasis">
+        <em>
+         bytes (-b), characters (-c)
+        </em>
+       </span>
+       , or
+       <span class="emphasis">
+        <em>
+         fields (-f)
+        </em>
+       </span>
+       separated by a
+       <span class="emphasis">
+        <em>
+         delimiter (-d  the tab character by default)
+        </em>
+       </span>
+       . A range must be provided in each case which consists of one of N, N-M, N- (N to the end of the line), or -M (beginning of the line to M), where N and M are counted from 1 (there is no zeroth value). Since version 6, an error is thrown if you include a zeroth value. Prior to this the value was ignored and assumed to be 1.
+      </p>
+      <p id="ch9Using_Linux_Tools_c9">
+       Assuming a file named file containing the lines:
+      </p>
+      <pre class="programlisting">
+       foo:bar:baz:qux:quux
 one:two:three:four:five:six:seven
-alpha:beta:gamma:delta:epsilon:zeta:eta:teta:iota:kappa:lambda:mu</pre>
-<p><a name="ch9Using_Linux_Tools_ca"></a>To output the fourth through tenth characters of each line:</p>
-<pre class="programlisting">
-$ cut -c 4-10 file</pre>
-<p><a name="ch9Using_Linux_Tools_cb"></a>This gives the output:</p>
-<pre class="programlisting">
-:bar:ba
+alpha:beta:gamma:delta:epsilon:zeta:eta:teta:iota:kappa:lambda:mu
+      </pre>
+      <p id="ch9Using_Linux_Tools_ca">
+       To output the fourth through tenth characters of each line:
+      </p>
+      <pre class="programlisting">
+       $ cut -c 4-10 file
+      </pre>
+      <p id="ch9Using_Linux_Tools_cb">
+       This gives the output:
+      </p>
+      <pre class="programlisting">
+       :bar:ba
 :two:th
-ha:beta</pre>
-<p><a name="ch9Using_Linux_Tools_cc"></a>To output the fifth field through the end of the line of each line using the colon character as the field delimiter:</p>
-<pre class="programlisting">
-$ cut -d : -f 5- file</pre>
-<p><a name="ch9Using_Linux_Tools_cd"></a>This gives the output:</p>
-<pre class="programlisting">
-quux
+ha:beta
+      </pre>
+      <p id="ch9Using_Linux_Tools_cc">
+       To output the fifth field through the end of the line of each line using the colon character as the field delimiter:
+      </p>
+      <pre class="programlisting">
+       $ cut -d : -f 5- file
+      </pre>
+      <p id="ch9Using_Linux_Tools_cd">
+       This gives the output:
+      </p>
+      <pre class="programlisting">
+       quux
 five:six:seven
-epsilon:zeta:eta:teta:iota:kappa:lambda:mu</pre>
-</div>
-<div class="section" title="7.4. paste">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="id2948562"></a>7.4. paste</h3></div></div></div>
-<p><a name="ch9Using_Linux_Tools_ce"></a><span class="emphasis"><em>paste</em></span> is a Unix command line utility which is used to join files horizontally (parallel merging) by outputting lines consisting of the sequentially corresponding lines of each file specified, separated by tabs, to the standard output. It is effectively the horizontal equivalent to the utility <span class="emphasis"><em>cat</em></span> command which operates on the vertical plane of two or more files.</p>
-<p><a name="ch9Using_Linux_Tools_cf"></a>To paste several columns of data together into the file <span class="emphasis"><em>www</em></span> from files <span class="emphasis"><em>who</em></span>, <span class="emphasis"><em>where</em></span>, and <span class="emphasis"><em>when</em></span>:</p>
-<pre class="programlisting">
-$ paste who where when &gt; www</pre>
-<p><a name="ch9Using_Linux_Tools_d0"></a>If the files contain:</p>
-<p><a name="ch9Using_Linux_Tools_d1"></a>who</p>
-<p><a name="ch9Using_Linux_Tools_d2"></a>where</p>
-<p><a name="ch9Using_Linux_Tools_d3"></a>when</p>
-<p><a name="ch9Using_Linux_Tools_d4"></a>Batman</p>
-<p><a name="ch9Using_Linux_Tools_d5"></a>GothamCity</p>
-<p><a name="ch9Using_Linux_Tools_d6"></a>January 3</p>
-<p><a name="ch9Using_Linux_Tools_d7"></a>Trillian</p>
-<p><a name="ch9Using_Linux_Tools_d8"></a>Andromeda</p>
-<p><a name="ch9Using_Linux_Tools_d9"></a>February 4</p>
-<p><a name="ch9Using_Linux_Tools_da"></a>Jeeves</p>
-<p><a name="ch9Using_Linux_Tools_db"></a>London</p>
-<p><a name="ch9Using_Linux_Tools_dc"></a>March 19</p>
-<p><a name="ch9Using_Linux_Tools_dd"></a>This creates the file named <span class="emphasis"><em>www</em></span> containing:</p>
-<pre class="programlisting">
-Batman            GothamCity       January 3
+epsilon:zeta:eta:teta:iota:kappa:lambda:mu
+      </pre>
+     </div>
+     <div class="section" title="7.4.paste">
+      <div class="titlepage">
+       <div>
+        <div>
+         <h3 class="title">
+          <a name="id2627231">
+          </a>
+          7.4.paste
+         </h3>
+        </div>
+       </div>
+      </div>
+      <p id="ch9Using_Linux_Tools_ce">
+       <span class="emphasis">
+        <em>
+         paste
+        </em>
+       </span>
+       is a Unix command line utility which is used to join files horizontally (parallel merging) by outputting lines consisting of the sequentially corresponding lines of each file specified, separated by tabs, to the standard output. It is effectively the horizontal equivalent to the utility
+       <span class="emphasis">
+        <em>
+         cat
+        </em>
+       </span>
+       command which operates on the vertical plane of two or more files.
+      </p>
+      <p id="ch9Using_Linux_Tools_cf">
+       To paste several columns of data together into the file
+       <span class="emphasis">
+        <em>
+         www
+        </em>
+       </span>
+       from files
+       <span class="emphasis">
+        <em>
+         who
+        </em>
+       </span>
+       ,
+       <span class="emphasis">
+        <em>
+         where
+        </em>
+       </span>
+       , and
+       <span class="emphasis">
+        <em>
+         when
+        </em>
+       </span>
+       :
+      </p>
+      <pre class="programlisting">
+       $ paste who where when &gt; www
+      </pre>
+      <p id="ch9Using_Linux_Tools_d0">
+       If the files contain:
+      </p>
+      <p id="ch9Using_Linux_Tools_d1">
+       who
+      </p>
+      <p id="ch9Using_Linux_Tools_d2">
+       where
+      </p>
+      <p id="ch9Using_Linux_Tools_d3">
+       when
+      </p>
+      <p id="ch9Using_Linux_Tools_d4">
+       Batman
+      </p>
+      <p id="ch9Using_Linux_Tools_d5">
+       GothamCity
+      </p>
+      <p id="ch9Using_Linux_Tools_d6">
+       January 3
+      </p>
+      <p id="ch9Using_Linux_Tools_d7">
+       Trillian
+      </p>
+      <p id="ch9Using_Linux_Tools_d8">
+       Andromeda
+      </p>
+      <p id="ch9Using_Linux_Tools_d9">
+       February 4
+      </p>
+      <p id="ch9Using_Linux_Tools_da">
+       Jeeves
+      </p>
+      <p id="ch9Using_Linux_Tools_db">
+       London
+      </p>
+      <p id="ch9Using_Linux_Tools_dc">
+       March 19
+      </p>
+      <p id="ch9Using_Linux_Tools_dd">
+       This creates the file named
+       <span class="emphasis">
+        <em>
+         www
+        </em>
+       </span>
+       containing:
+      </p>
+      <pre class="programlisting">
+       Batman            GothamCity       January 3
 Trillian          Andromeda        February 4
-Jeeves            London           March 19</pre>
-</div>
-</div>
-<div class="section" title="8. Shell Meta Characters">
-<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="id2948682"></a>8. Shell Meta Characters</h2></div></div></div>
-<p><a name="ch9Using_Linux_Tools_de"></a>Unix recognizes certain special characters, called "meta characters," as command directives. The shell meta characters are recognized anywhere they appear in the command line, even if they are not surrounded by blank space. For that reason, it is safest to only use the characters A-Z, a-z, 0-9, and the period, dash, and underscore characters when naming files and directories on Unix. If your file or directory has a shell meta character in the name, you will find it difficult to use the name in a shell command.</p>
-<p><a name="ch9Using_Linux_Tools_df"></a>The shell meta characters include:</p>
-<p><a name="ch9Using_Linux_Tools_e0"></a>/ &lt; &gt; ! $ % ^ &amp; * | { } [ ] " ' ` ~ ;</p>
-<p><a name="ch9Using_Linux_Tools_e1"></a>Different shells may differ in the meta characters recognized.</p>
-<p><a name="ch9Using_Linux_Tools_e2"></a>As an example,</p>
-<pre class="programlisting">
-$ ls file.*</pre>
-<p><a name="ch9Using_Linux_Tools_e3"></a>run on a directory containing the files file, file.c, file.lst, and myfile would list the files file.c and file.lst. However,:</p>
-<pre class="programlisting">
-$ ls file.?</pre>
-<p><a name="ch9Using_Linux_Tools_e4"></a>run on the same directory would only list file.c because the ? only matches one character, no more, no less. This can save you a great deal of typing time. For example, if there is a file called california_cornish_hens_with_wild_rice and no other files whose names begin with 'c', you could view the file without typing the whole name by typing this:</p>
-<pre class="programlisting">
-$ more c*</pre>
-<p><a name="ch9Using_Linux_Tools_e5"></a>because the c* matches that long file name.</p>
-<p><a name="ch9Using_Linux_Tools_e6"></a>Filenames containing metacharacters can pose many problems and should never be intentionally created. If you do find that you've created a file with metacharacters, and you would like to remove it, you have three options. You may use wildcards to match metacharacter, use the  to directly enter the filename, or put the command in double quotes (except in the case of double quotes within the file name, these must be captured with one of the first two methods). For example, deleting a file named "``*`|more"` can be accomplished with:</p>
-<pre class="programlisting">
-$ rm ??more</pre>
-<p><a name="ch9Using_Linux_Tools_e7"></a>or:</p>
-<pre class="programlisting">
-$ rm $ backslash$*$ backslash$|more</pre>
-<p><a name="ch9Using_Linux_Tools_e8"></a>or:</p>
-<pre class="programlisting">
-$ rm ''*|more''</pre>
-</div>
-<div class="section" title="9. Looking At Files">
-<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="id2948789"></a>9. Looking At Files</h2></div></div></div>
-<div class="section" title="9.1. cat">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="id2948797"></a>9.1. cat</h3></div></div></div>
-<p><a name="ch9Using_Linux_Tools_e9"></a>The <span class="emphasis"><em>cat</em></span> command is a standard Unix program used to concatenate and display files. The name is from "catenate", a synonym of <span class="emphasis"><em>concatenate</em></span>.</p>
-<p><a name="ch9Using_Linux_Tools_ea"></a>The Single Unix Specification specifies the behavior that the contents of each of the files given in sequence as arguments will be written to the standard output in the same sequence, and mandates one option, -u, where each byte is printed as it is read.</p>
-<p><a name="ch9Using_Linux_Tools_eb"></a>If the filename is specified as -, then <span class="emphasis"><em>cat</em></span> will read from standard input at that point in the sequence. If no files are specified, <span class="emphasis"><em>cat</em></span> will read from standard input entered.</p>
-<div class="section" title="9.1.1. Jargon File Definition">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="id2948841"></a>9.1.1. Jargon File Definition</h4></div></div></div>
-<p><a name="ch9Using_Linux_Tools_ec"></a>The Jargon File version 4.4.7 lists this as the definition of <span class="emphasis"><em>cat</em></span>:</p>
-<pre class="programlisting">
-1. To spew an entire file to the screen or some other output sink without
+Jeeves            London           March 19
+      </pre>
+     </div>
+    </div>
+    <div class="section" title="8.Shell Meta Characters">
+     <div class="titlepage">
+      <div>
+       <div>
+        <h2 class="title" style="clear: both">
+         <a name="id2627351">
+         </a>
+         8.Shell Meta Characters
+        </h2>
+       </div>
+      </div>
+     </div>
+     <p id="ch9Using_Linux_Tools_de">
+      Unix recognizes certain special characters, called "meta characters," as command directives. The shell meta characters are recognized anywhere they appear in the command line, even if they are not surrounded by blank space. For that reason, it is safest to only use the characters A-Z, a-z, 0-9, and the period, dash, and underscore characters when naming files and directories on Unix. If your file or directory has a shell meta character in the name, you will find it difficult to use the name in a shell command.
+     </p>
+     <p id="ch9Using_Linux_Tools_df">
+      The shell meta characters include:
+     </p>
+     <p id="ch9Using_Linux_Tools_e0">
+      / &lt; &gt; ! $ % ^ &amp; * | { } [ ] " ' ` ~ ;
+     </p>
+     <p id="ch9Using_Linux_Tools_e1">
+      Different shells may differ in the meta characters recognized.
+     </p>
+     <p id="ch9Using_Linux_Tools_e2">
+      As an example,
+     </p>
+     <pre class="programlisting">
+      $ ls file.*
+     </pre>
+     <p id="ch9Using_Linux_Tools_e3">
+      run on a directory containing the files file, file.c, file.lst, and myfile would list the files file.c and file.lst. However,:
+     </p>
+     <pre class="programlisting">
+      $ ls file.?
+     </pre>
+     <p id="ch9Using_Linux_Tools_e4">
+      run on the same directory would only list file.c because the ? only matches one character, no more, no less. This can save you a great deal of typing time. For example, if there is a file called california_cornish_hens_with_wild_rice and no other files whose names begin with 'c', you could view the file without typing the whole name by typing this:
+     </p>
+     <pre class="programlisting">
+      $ more c*
+     </pre>
+     <p id="ch9Using_Linux_Tools_e5">
+      because the c* matches that long file name.
+     </p>
+     <p id="ch9Using_Linux_Tools_e6">
+      Filenames containing metacharacters can pose many problems and should never be intentionally created. If you do find that you've created a file with metacharacters, and you would like to remove it, you have three options. You may use wildcards to match metacharacter, use the  to directly enter the filename, or put the command in double quotes (except in the case of double quotes within the file name, these must be captured with one of the first two methods). For example, deleting a file named "``*`|more"` can be accomplished with:
+     </p>
+     <pre class="programlisting">
+      $ rm ??more
+     </pre>
+     <p id="ch9Using_Linux_Tools_e7">
+      or:
+     </p>
+     <pre class="programlisting">
+      $ rm $ backslash$*$ backslash$|more
+     </pre>
+     <p id="ch9Using_Linux_Tools_e8">
+      or:
+     </p>
+     <pre class="programlisting">
+      $ rm ''*|more''
+     </pre>
+    </div>
+    <div class="section" title="9.Looking At Files">
+     <div class="titlepage">
+      <div>
+       <div>
+        <h2 class="title" style="clear: both">
+         <a name="id2627457">
+         </a>
+         9.Looking At Files
+        </h2>
+       </div>
+      </div>
+     </div>
+     <div class="section" title="9.1.cat">
+      <div class="titlepage">
+       <div>
+        <div>
+         <h3 class="title">
+          <a name="id2627466">
+          </a>
+          9.1.cat
+         </h3>
+        </div>
+       </div>
+      </div>
+      <p id="ch9Using_Linux_Tools_e9">
+       The
+       <span class="emphasis">
+        <em>
+         cat
+        </em>
+       </span>
+       command is a standard Unix program used to concatenate and display files. The name is from "catenate", a synonym of
+       <span class="emphasis">
+        <em>
+         concatenate
+        </em>
+       </span>
+       .
+      </p>
+      <p id="ch9Using_Linux_Tools_ea">
+       The Single Unix Specification specifies the behavior that the contents of each of the files given in sequence as arguments will be written to the standard output in the same sequence, and mandates one option, -u, where each byte is printed as it is read.
+      </p>
+      <p id="ch9Using_Linux_Tools_eb">
+       If the filename is specified as -, then
+       <span class="emphasis">
+        <em>
+         cat
+        </em>
+       </span>
+       will read from standard input at that point in the sequence. If no files are specified,
+       <span class="emphasis">
+        <em>
+         cat
+        </em>
+       </span>
+       will read from standard input entered.
+      </p>
+      <div class="section" title="9.1.1.Jargon File Definition">
+       <div class="titlepage">
+        <div>
+         <div>
+          <h4 class="title">
+           <a name="id2627510">
+           </a>
+           9.1.1.Jargon File Definition
+          </h4>
+         </div>
+        </div>
+       </div>
+       <p id="ch9Using_Linux_Tools_ec">
+        The Jargon File version 4.4.7 lists this as the definition of
+        <span class="emphasis">
+         <em>
+          cat
+         </em>
+        </span>
+        :
+       </p>
+       <pre class="programlisting">
+        1. To spew an entire file to the screen or some other output sink without
      pause (syn. blast).
 
 2. By extension, to dump large amounts of data at an unprepared target or
@@ -829,258 +3479,992 @@
      than to concatenate two or more files. The name cat for the former
      operation is just as unintuitive as, say, LISP's cdr.
 
-     Of such oppositions are holy wars made...</pre>
-</div>
-<div class="section" title="9.1.2. Useless Use of 'cat'">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="id2948880"></a>9.1.2. Useless Use of 'cat'</h4></div></div></div>
-<p><a name="ch9Using_Linux_Tools_ed"></a>UUOC (from comp.unix.shell on Usenet) stands for “Useless Use of cat”. As it is observed on <span class="emphasis"><em>comp.unix.shell</em></span>, “The purpose of cat is to concatenate (or 'catenate') files. If it's only one file, concatenating it with nothing at all is a waste of time, and costs you a process.”</p>
-<p><a name="ch9Using_Linux_Tools_ee"></a>Nevertheless one sees people doing:</p>
-<pre class="programlisting">
-$ cat file | some_command and its args ...</pre>
-<p><a name="ch9Using_Linux_Tools_ef"></a>instead of the equivalent and cheaper:</p>
-<pre class="programlisting">
-&lt;file some_command and its args ...</pre>
-<p><a name="ch9Using_Linux_Tools_f0"></a>or (equivalently and more classically):</p>
-<pre class="programlisting">
-some_command and its args ... &lt;file</pre>
-<p><a name="ch9Using_Linux_Tools_f1"></a>Since 1995, occasional awards for UUOC have been given out. The activity of fixing instances of UUOC is sometimes called 'demoggification'.</p>
-<p><a name="ch9Using_Linux_Tools_f2"></a>Amongst many, it is still considered safer to use <span class="emphasis"><em>cat</em></span> for such cases given that the &lt; and &gt; keys are next to each other in many popular keyboard mappings. While the risk might be low, the impact of using &gt; instead of &lt; can be high and prohibitive.</p>
-</div>
-<div class="section" title="9.1.3. zcat">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="id2948951"></a>9.1.3. zcat</h4></div></div></div>
-<p><a name="ch9Using_Linux_Tools_f3"></a><span class="emphasis"><em>zcat</em></span> is a Unix program similar to <span class="emphasis"><em>cat</em></span>, that decompresses individual files and concatenates them to standard output. Traditionally <span class="emphasis"><em>zcat</em></span> operated on files compressed by compress but today it is usually able to operate on <span class="emphasis"><em>gzip</em></span> or even <span class="emphasis"><em>bzip2</em></span> archives. On such systems, it is equivalent to <span class="emphasis"><em>gunzip -c</em></span></p>
-</div>
-</div>
-<div class="section" title="9.2. more">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="id2948985"></a>9.2. more</h3></div></div></div>
-<p><a name="ch9Using_Linux_Tools_f4"></a>In computing, <span class="emphasis"><em>more</em></span> is a command to view (but not modify) the contents of a text file one screen at a time (terminal pager). It is available on Unix and Unix-like systems, DOS, OS/2 and Microsoft Windows. Programs of this sort are called pagers.</p>
-<div class="section" title="9.2.1. Usage">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="id2949004"></a>9.2.1. Usage</h4></div></div></div>
-<p><a name="ch9Using_Linux_Tools_f5"></a>The command-syntax is:</p>
-<pre class="programlisting">
-$ more [options] [file_name]</pre>
-<p><a name="ch9Using_Linux_Tools_f6"></a>If no file name is provided, <span class="emphasis"><em>more</em></span> looks for input from stdin.</p>
-<p><a name="ch9Using_Linux_Tools_f7"></a>Once <span class="emphasis"><em>more</em></span> has obtained input, it displays as much as can fit on the current screen and waits for user input to advance, with the exception that a form feed (^L) will also cause <span class="emphasis"><em>more</em></span> to wait at that line, regardless of the amount of text on the screen. In the lower-left corner of the screen is displayed the text "--More--" and a percentage, representing the percent of the file that <span class="emphasis"><em>more</em></span> has paged through. (This percentage includes the text displayed on the current screen.) When <span class="emphasis"><em>more</em></span> reaches the end of a file (100%) it exits. The most common methods of navigating through a file are <span class="emphasis"><em>Enter</em></span>, which advances the output by one line, and <span class="emphasis"><em>Space</em></span>, which advances the output by one screen.</p>
-<p><a name="ch9Using_Linux_Tools_f8"></a>There are also other commands that can be used while navigating through the document; consult <span class="emphasis"><em>more</em></span>'s <span class="emphasis"><em>man</em></span> page for more details.</p>
-<p><a name="ch9Using_Linux_Tools_f9"></a><span class="emphasis"><em>Options</em></span> are typically entered before the file name, but can also be entered in the environment variable <span class="emphasis"><em>$MORE</em></span>. Options entered in the actual command line will override those entered in the <span class="emphasis"><em>$MORE</em></span> environment variable. Available options may vary between Unix systems.</p>
-</div>
-</div>
-<div class="section" title="9.3. less">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="id2949096"></a>9.3. less</h3></div></div></div>
-<p><a name="ch9Using_Linux_Tools_fa"></a><span class="emphasis"><em>less</em></span> is a terminal pager program on Unix, Windows and Unix-like systems used to view (but not change) the contents of a text file one screen at a time. It is similar to <span class="emphasis"><em>more</em></span>, but has the extended capability of allowing both forward and backward navigation through the file. Unlike most Unix text editors/viewers, <span class="emphasis"><em>less</em></span> does not need to read the entire file before starting, resulting in faster load times with large files.</p>
-<div class="section" title="9.3.1. Usage">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="id2949125"></a>9.3.1. Usage</h4></div></div></div>
-<p><a name="ch9Using_Linux_Tools_fb"></a><span class="emphasis"><em>less</em></span> can be invoked with options to change its behaviour, for example, the number of lines to display on the screen. A few options vary depending on the operating system. While <span class="emphasis"><em>less</em></span> is displaying the file, various commands can be used to navigate through the file. These commands are based on those used by both <span class="emphasis"><em>more</em></span> and <span class="emphasis"><em>vi</em></span>. It is also possible to search for character patterns in the file.</p>
-<p><a name="ch9Using_Linux_Tools_fc"></a>By default, <span class="emphasis"><em>less</em></span> displays the contents of the file to the standard output (one screen at a time). If the file name argument is omitted, it displays the contents from standard input (usually the output of another command through a pipe). If the output is redirected to anything other than a terminal, for example a pipe to another command, less behaves like cat.</p>
-<p><a name="ch9Using_Linux_Tools_fd"></a>The command-syntax is:</p>
-<pre class="programlisting">
-$ less [options] file_name</pre>
-</div>
-<div class="section" title="9.3.2. Frequently Used Options">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="id2949180"></a>9.3.2. Frequently Used Options</h4></div></div></div>
-<div class="itemizedlist"><ul class="itemizedlist" type="*">
-<li class="listitem" style="list-style-type: *"><p><a name="ch9Using_Linux_Tools_fe"></a>-g: Highlights just the current match of any searched string.</p></li>
-<li class="listitem" style="list-style-type: *"><p><a name="ch9Using_Linux_Tools_ff"></a>-I: Case-insensitive searches.</p></li>
-<li class="listitem" style="list-style-type: *"><p><a name="ch9Using_Linux_Tools_100"></a>-M: Shows more detailed prompt, including file position.</p></li>
-<li class="listitem" style="list-style-type: *"><p><a name="ch9Using_Linux_Tools_101"></a>-N: Shows line numbers (useful for source code viewing).</p></li>
-<li class="listitem" style="list-style-type: *"><p><a name="ch9Using_Linux_Tools_102"></a>-S: Disables line wrap ("chop long lines"). Long lines can be seen by side scrolling.</p></li>
-<li class="listitem" style="list-style-type: *"><p><a name="ch9Using_Linux_Tools_103"></a>-?: Shows help.</p></li>
-</ul></div>
-</div>
-<div class="section" title="9.3.3. Frequently Used Commands">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="id2949232"></a>9.3.3. Frequently Used Commands</h4></div></div></div>
-<div class="itemizedlist"><ul class="itemizedlist" type="*">
-<li class="listitem" style="list-style-type: *"><p><a name="ch9Using_Linux_Tools_104"></a>[Arrows]/[Page Up]/[Page Down]/[Home]/[End]: Navigation.</p></li>
-<li class="listitem" style="list-style-type: *"><p><a name="ch9Using_Linux_Tools_105"></a>[Space bar]: Next page.</p></li>
-<li class="listitem" style="list-style-type: *"><p><a name="ch9Using_Linux_Tools_106"></a>b: Previous page.</p></li>
-<li class="listitem" style="list-style-type: *"><p><a name="ch9Using_Linux_Tools_107"></a>ng: Jump to line number n. Default is the start of the file.</p></li>
-<li class="listitem" style="list-style-type: *"><p><a name="ch9Using_Linux_Tools_108"></a>nG: Jump to line number n. Default is the end of the file.</p></li>
-<li class="listitem" style="list-style-type: *"><p><a name="ch9Using_Linux_Tools_109"></a>/pattern: Search for pattern. Regular expressions can be used.</p></li>
-<li class="listitem" style="list-style-type: *"><p><a name="ch9Using_Linux_Tools_10a"></a>'^ or g: Go to start of file.</p></li>
-<li class="listitem" style="list-style-type: *"><p><a name="ch9Using_Linux_Tools_10b"></a>'$ or G: Go to end of file.</p></li>
-<li class="listitem" style="list-style-type: *"><p><a name="ch9Using_Linux_Tools_10c"></a>s: Save current content (got from another program like grep) in a file.</p></li>
-<li class="listitem" style="list-style-type: *"><p><a name="ch9Using_Linux_Tools_10d"></a>=: File information.</p></li>
-<li class="listitem" style="list-style-type: *"><p><a name="ch9Using_Linux_Tools_10e"></a>h: Help.</p></li>
-<li class="listitem" style="list-style-type: *"><p><a name="ch9Using_Linux_Tools_10f"></a>q: Quit.</p></li>
-</ul></div>
-</div>
-<div class="section" title="9.3.4. Examples">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="id2949322"></a>9.3.4. Examples</h4></div></div></div>
-<pre class="programlisting">
-$ less -M readme.txt                     #Read "readme.txt."
+     Of such oppositions are holy wars made...
+       </pre>
+      </div>
+      <div class="section" title="9.1.2.Useless Use of 'cat'">
+       <div class="titlepage">
+        <div>
+         <div>
+          <h4 class="title">
+           <a name="id2627549">
+           </a>
+           9.1.2.Useless Use of 'cat'
+          </h4>
+         </div>
+        </div>
+       </div>
+       <p id="ch9Using_Linux_Tools_ed">
+        UUOC (from comp.unix.shell on Usenet) stands for Useless Use of cat. As it is observed on
+        <span class="emphasis">
+         <em>
+          comp.unix.shell
+         </em>
+        </span>
+        , The purpose of cat is to concatenate (or 'catenate') files. If it's only one file, concatenating it with nothing at all is a waste of time, and costs you a process.
+       </p>
+       <p id="ch9Using_Linux_Tools_ee">
+        Nevertheless one sees people doing:
+       </p>
+       <pre class="programlisting">
+        $ cat file | some_command and its args ...
+       </pre>
+       <p id="ch9Using_Linux_Tools_ef">
+        instead of the equivalent and cheaper:
+       </p>
+       <pre class="programlisting">
+        &lt;file some_command and its args ...
+       </pre>
+       <p id="ch9Using_Linux_Tools_f0">
+        or (equivalently and more classically):
+       </p>
+       <pre class="programlisting">
+        some_command and its args ... &lt;file
+       </pre>
+       <p id="ch9Using_Linux_Tools_f1">
+        Since 1995, occasional awards for UUOC have been given out. The activity of fixing instances of UUOC is sometimes called 'demoggification'.
+       </p>
+       <p id="ch9Using_Linux_Tools_f2">
+        Amongst many, it is still considered safer to use
+        <span class="emphasis">
+         <em>
+          cat
+         </em>
+        </span>
+        for such cases given that the &lt; and &gt; keys are next to each other in many popular keyboard mappings. While the risk might be low, the impact of using &gt; instead of &lt; can be high and prohibitive.
+       </p>
+      </div>
+      <div class="section" title="9.1.3.zcat">
+       <div class="titlepage">
+        <div>
+         <div>
+          <h4 class="title">
+           <a name="id2627620">
+           </a>
+           9.1.3.zcat
+          </h4>
+         </div>
+        </div>
+       </div>
+       <p id="ch9Using_Linux_Tools_f3">
+        <span class="emphasis">
+         <em>
+          zcat
+         </em>
+        </span>
+        is a Unix program similar to
+        <span class="emphasis">
+         <em>
+          cat
+         </em>
+        </span>
+        , that decompresses individual files and concatenates them to standard output. Traditionally
+        <span class="emphasis">
+         <em>
+          zcat
+         </em>
+        </span>
+        operated on files compressed by compress but today it is usually able to operate on
+        <span class="emphasis">
+         <em>
+          gzip
+         </em>
+        </span>
+        or even
+        <span class="emphasis">
+         <em>
+          bzip2
+         </em>
+        </span>
+        archives. On such systems, it is equivalent to
+        <span class="emphasis">
+         <em>
+          gunzip -c
+         </em>
+        </span>
+       </p>
+      </div>
+     </div>
+     <div class="section" title="9.2.more">
+      <div class="titlepage">
+       <div>
+        <div>
+         <h3 class="title">
+          <a name="id2627654">
+          </a>
+          9.2.more
+         </h3>
+        </div>
+       </div>
+      </div>
+      <p id="ch9Using_Linux_Tools_f4">
+       In computing,
+       <span class="emphasis">
+        <em>
+         more
+        </em>
+       </span>
+       is a command to view (but not modify) the contents of a text file one screen at a time (terminal pager). It is available on Unix and Unix-like systems, DOS, OS/2 and Microsoft Windows. Programs of this sort are called pagers.
+      </p>
+      <div class="section" title="9.2.1.Usage">
+       <div class="titlepage">
+        <div>
+         <div>
+          <h4 class="title">
+           <a name="id2627673">
+           </a>
+           9.2.1.Usage
+          </h4>
+         </div>
+        </div>
+       </div>
+       <p id="ch9Using_Linux_Tools_f5">
+        The command-syntax is:
+       </p>
+       <pre class="programlisting">
+        $ more [options] [file_name]
+       </pre>
+       <p id="ch9Using_Linux_Tools_f6">
+        If no file name is provided,
+        <span class="emphasis">
+         <em>
+          more
+         </em>
+        </span>
+        looks for input from stdin.
+       </p>
+       <p id="ch9Using_Linux_Tools_f7">
+        Once
+        <span class="emphasis">
+         <em>
+          more
+         </em>
+        </span>
+        has obtained input, it displays as much as can fit on the current screen and waits for user input to advance, with the exception that a form feed (^L) will also cause
+        <span class="emphasis">
+         <em>
+          more
+         </em>
+        </span>
+        to wait at that line, regardless of the amount of text on the screen. In the lower-left corner of the screen is displayed the text "--More--" and a percentage, representing the percent of the file that
+        <span class="emphasis">
+         <em>
+          more
+         </em>
+        </span>
+        has paged through. (This percentage includes the text displayed on the current screen.) When
+        <span class="emphasis">
+         <em>
+          more
+         </em>
+        </span>
+        reaches the end of a file (100%) it exits. The most common methods of navigating through a file are
+        <span class="emphasis">
+         <em>
+          Enter
+         </em>
+        </span>
+        , which advances the output by one line, and
+        <span class="emphasis">
+         <em>
+          Space
+         </em>
+        </span>
+        , which advances the output by one screen.
+       </p>
+       <p id="ch9Using_Linux_Tools_f8">
+        There are also other commands that can be used while navigating through the document; consult
+        <span class="emphasis">
+         <em>
+          more
+         </em>
+        </span>
+        's
+        <span class="emphasis">
+         <em>
+          man
+         </em>
+        </span>
+        page for more details.
+       </p>
+       <p id="ch9Using_Linux_Tools_f9">
+        <span class="emphasis">
+         <em>
+          Options
+         </em>
+        </span>
+        are typically entered before the file name, but can also be entered in the environment variable
+        <span class="emphasis">
+         <em>
+          $MORE
+         </em>
+        </span>
+        . Options entered in the actual command line will override those entered in the
+        <span class="emphasis">
+         <em>
+          $MORE
+         </em>
+        </span>
+        environment variable. Available options may vary between Unix systems.
+       </p>
+      </div>
+     </div>
+     <div class="section" title="9.3.less">
+      <div class="titlepage">
+       <div>
+        <div>
+         <h3 class="title">
+          <a name="id2627765">
+          </a>
+          9.3.less
+         </h3>
+        </div>
+       </div>
+      </div>
+      <p id="ch9Using_Linux_Tools_fa">
+       <span class="emphasis">
+        <em>
+         less
+        </em>
+       </span>
+       is a terminal pager program on Unix, Windows and Unix-like systems used to view (but not change) the contents of a text file one screen at a time. It is similar to
+       <span class="emphasis">
+        <em>
+         more
+        </em>
+       </span>
+       , but has the extended capability of allowing both forward and backward navigation through the file. Unlike most Unix text editors/viewers,
+       <span class="emphasis">
+        <em>
+         less
+        </em>
+       </span>
+       does not need to read the entire file before starting, resulting in faster load times with large files.
+      </p>
+      <div class="section" title="9.3.1.Usage">
+       <div class="titlepage">
+        <div>
+         <div>
+          <h4 class="title">
+           <a name="id2627794">
+           </a>
+           9.3.1.Usage
+          </h4>
+         </div>
+        </div>
+       </div>
+       <p id="ch9Using_Linux_Tools_fb">
+        <span class="emphasis">
+         <em>
+          less
+         </em>
+        </span>
+        can be invoked with options to change its behaviour, for example, the number of lines to display on the screen. A few options vary depending on the operating system. While
+        <span class="emphasis">
+         <em>
+          less
+         </em>
+        </span>
+        is displaying the file, various commands can be used to navigate through the file. These commands are based on those used by both
+        <span class="emphasis">
+         <em>
+          more
+         </em>
+        </span>
+        and
+        <span class="emphasis">
+         <em>
+          vi
+         </em>
+        </span>
+        . It is also possible to search for character patterns in the file.
+       </p>
+       <p id="ch9Using_Linux_Tools_fc">
+        By default,
+        <span class="emphasis">
+         <em>
+          less
+         </em>
+        </span>
+        displays the contents of the file to the standard output (one screen at a time). If the file name argument is omitted, it displays the contents from standard input (usually the output of another command through a pipe). If the output is redirected to anything other than a terminal, for example a pipe to another command, less behaves like cat.
+       </p>
+       <p id="ch9Using_Linux_Tools_fd">
+        The command-syntax is:
+       </p>
+       <pre class="programlisting">
+        $ less [options] file_name
+       </pre>
+      </div>
+      <div class="section" title="9.3.2.Frequently Used Options">
+       <div class="titlepage">
+        <div>
+         <div>
+          <h4 class="title">
+           <a name="id2627848">
+           </a>
+           9.3.2.Frequently Used Options
+          </h4>
+         </div>
+        </div>
+       </div>
+       <div class="itemizedlist">
+        <ul class="itemizedlist" type="*">
+         <li class="listitem" style="list-style-type: *">
+          <p id="ch9Using_Linux_Tools_fe">
+           -g: Highlights just the current match of any searched string.
+          </p>
+         </li>
+         <li class="listitem" style="list-style-type: *">
+          <p id="ch9Using_Linux_Tools_ff">
+           -I: Case-insensitive searches.
+          </p>
+         </li>
+         <li class="listitem" style="list-style-type: *">
+          <p id="ch9Using_Linux_Tools_100">
+           -M: Shows more detailed prompt, including file position.
+          </p>
+         </li>
+         <li class="listitem" style="list-style-type: *">
+          <p id="ch9Using_Linux_Tools_101">
+           -N: Shows line numbers (useful for source code viewing).
+          </p>
+         </li>
+         <li class="listitem" style="list-style-type: *">
+          <p id="ch9Using_Linux_Tools_102">
+           -S: Disables line wrap ("chop long lines"). Long lines can be seen by side scrolling.
+          </p>
+         </li>
+         <li class="listitem" style="list-style-type: *">
+          <p id="ch9Using_Linux_Tools_103">
+           -?: Shows help.
+          </p>
+         </li>
+        </ul>
+       </div>
+      </div>
+      <div class="section" title="9.3.3.Frequently Used Commands">
+       <div class="titlepage">
+        <div>
+         <div>
+          <h4 class="title">
+           <a name="id2627901">
+           </a>
+           9.3.3.Frequently Used Commands
+          </h4>
+         </div>
+        </div>
+       </div>
+       <div class="itemizedlist">
+        <ul class="itemizedlist" type="*">
+         <li class="listitem" style="list-style-type: *">
+          <p id="ch9Using_Linux_Tools_104">
+           [Arrows]/[Page Up]/[Page Down]/[Home]/[End]: Navigation.
+          </p>
+         </li>
+         <li class="listitem" style="list-style-type: *">
+          <p id="ch9Using_Linux_Tools_105">
+           [Space bar]: Next page.
+          </p>
+         </li>
+         <li class="listitem" style="list-style-type: *">
+          <p id="ch9Using_Linux_Tools_106">
+           b: Previous page.
+          </p>
+         </li>
+         <li class="listitem" style="list-style-type: *">
+          <p id="ch9Using_Linux_Tools_107">
+           ng: Jump to line number n. Default is the start of the file.
+          </p>
+         </li>
+         <li class="listitem" style="list-style-type: *">
+          <p id="ch9Using_Linux_Tools_108">
+           nG: Jump to line number n. Default is the end of the file.
+          </p>
+         </li>
+         <li class="listitem" style="list-style-type: *">
+          <p id="ch9Using_Linux_Tools_109">
+           /pattern: Search for pattern. Regular expressions can be used.
+          </p>
+         </li>
+         <li class="listitem" style="list-style-type: *">
+          <p id="ch9Using_Linux_Tools_10a">
+           '^ or g: Go to start of file.
+          </p>
+         </li>
+         <li class="listitem" style="list-style-type: *">
+          <p id="ch9Using_Linux_Tools_10b">
+           '$ or G: Go to end of file.
+          </p>
+         </li>
+         <li class="listitem" style="list-style-type: *">
+          <p id="ch9Using_Linux_Tools_10c">
+           s: Save current content (got from another program like grep) in a file.
+          </p>
+         </li>
+         <li class="listitem" style="list-style-type: *">
+          <p id="ch9Using_Linux_Tools_10d">
+           =: File information.
+          </p>
+         </li>
+         <li class="listitem" style="list-style-type: *">
+          <p id="ch9Using_Linux_Tools_10e">
+           h: Help.
+          </p>
+         </li>
+         <li class="listitem" style="list-style-type: *">
+          <p id="ch9Using_Linux_Tools_10f">
+           q: Quit.
+          </p>
+         </li>
+        </ul>
+       </div>
+      </div>
+      <div class="section" title="9.3.4.Examples">
+       <div class="titlepage">
+        <div>
+         <div>
+          <h4 class="title">
+           <a name="id2627990">
+           </a>
+           9.3.4.Examples
+          </h4>
+         </div>
+        </div>
+       </div>
+       <pre class="programlisting">
+        $ less -M readme.txt                     #Read "readme.txt."
 $ less +F /var/log/mail.log              #Follow mode for log
 $ file * | less                          #Easier file analysis.
-$ grep -i void *.c | less -I -p void     #Case insensitive search                                                         for "void" in all .c files</pre>
-</div>
-</div>
-</div>
-<div class="section" title="10. Directory Structure">
-<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="id2949337"></a>10. Directory Structure</h2></div></div></div>
-<p><a name="ch9Using_Linux_Tools_110"></a>In the File Hierarchy Standard (FHS) all files and directories appear under the root directory "/", even if they are stored on different physical devices. Note however that some of these directories may or may not be present on a Unix system depending on whether certain subsystems, such as the X Window System, are installed.</p>
-<p><a name="ch9Using_Linux_Tools_111"></a>The majority of these directories exist in all UNIX operating systems and are generally used in much the same way; however, the descriptions here are those used specifically for the FHS, and are not considered authoritative for platforms other than Linux.</p>
-<p><a name="ch9Using_Linux_Tools_112"></a>Directory</p>
-<p><a name="ch9Using_Linux_Tools_113"></a>Description</p>
-<p><a name="ch9Using_Linux_Tools_114"></a>/</p>
-<p><a name="ch9Using_Linux_Tools_115"></a>Primary hierarchy root and root directory of
-the entire file system hierarchy.</p>
-<p><a name="ch9Using_Linux_Tools_116"></a>/bin/</p>
-<p><a name="ch9Using_Linux_Tools_117"></a>Essential command binaries that need to be
+$ grep -i void *.c | less -I -p void     #Case insensitive search                                                         for "void" in all .c files
+       </pre>
+      </div>
+     </div>
+    </div>
+    <div class="section" title="10.Directory Structure">
+     <div class="titlepage">
+      <div>
+       <div>
+        <h2 class="title" style="clear: both">
+         <a name="id2628006">
+         </a>
+         10.Directory Structure
+        </h2>
+       </div>
+      </div>
+     </div>
+     <p id="ch9Using_Linux_Tools_110">
+      In the File Hierarchy Standard (FHS) all files and directories appear under the root directory "/", even if they are stored on different physical devices. Note however that some of these directories may or may not be present on a Unix system depending on whether certain subsystems, such as the X Window System, are installed.
+     </p>
+     <p id="ch9Using_Linux_Tools_111">
+      The majority of these directories exist in all UNIX operating systems and are generally used in much the same way; however, the descriptions here are those used specifically for the FHS, and are not considered authoritative for platforms other than Linux.
+     </p>
+     <p id="ch9Using_Linux_Tools_112">
+      Directory
+     </p>
+     <p id="ch9Using_Linux_Tools_113">
+      Description
+     </p>
+     <p id="ch9Using_Linux_Tools_114">
+      /
+     </p>
+     <p id="ch9Using_Linux_Tools_115">
+      Primary hierarchy root and root directory of
+the entire file system hierarchy.
+     </p>
+     <p id="ch9Using_Linux_Tools_116">
+      /bin/
+     </p>
+     <p id="ch9Using_Linux_Tools_117">
+      Essential command binaries that need to be
 available in single user mode; for all users,
-e.g., <span class="emphasis"><em>cat</em></span>, <span class="emphasis"><em>ls</em></span>, <span class="emphasis"><em>cp</em></span>.</p>
-<p><a name="ch9Using_Linux_Tools_118"></a>/boot/</p>
-<p><a name="ch9Using_Linux_Tools_119"></a>Boot loader files, e.g., <span class="emphasis"><em>kernels</em></span>, <span class="emphasis"><em>initrd</em></span>;
-often a separate partition.</p>
-<p><a name="ch9Using_Linux_Tools_11a"></a>/dev/</p>
-<p><a name="ch9Using_Linux_Tools_11b"></a>Essential devices, e.g., /dev/null</p>
-<p><a name="ch9Using_Linux_Tools_11c"></a>/etc/</p>
-<p><a name="ch9Using_Linux_Tools_11d"></a>Host-specific system-wide configuration files
-(the name comes from <span class="emphasis"><em>et cetera</em></span>)</p>
-<p><a name="ch9Using_Linux_Tools_11e"></a>/home/</p>
-<p><a name="ch9Using_Linux_Tools_11f"></a>User's home directories, containing saved
+e.g.,
+      <span class="emphasis">
+       <em>
+        cat
+       </em>
+      </span>
+      ,
+      <span class="emphasis">
+       <em>
+        ls
+       </em>
+      </span>
+      ,
+      <span class="emphasis">
+       <em>
+        cp
+       </em>
+      </span>
+      .
+     </p>
+     <p id="ch9Using_Linux_Tools_118">
+      /boot/
+     </p>
+     <p id="ch9Using_Linux_Tools_119">
+      Boot loader files, e.g.,
+      <span class="emphasis">
+       <em>
+        kernels
+       </em>
+      </span>
+      ,
+      <span class="emphasis">
+       <em>
+        initrd
+       </em>
+      </span>
+      ;
+often a separate partition.
+     </p>
+     <p id="ch9Using_Linux_Tools_11a">
+      /dev/
+     </p>
+     <p id="ch9Using_Linux_Tools_11b">
+      Essential devices, e.g., /dev/null
+     </p>
+     <p id="ch9Using_Linux_Tools_11c">
+      /etc/
+     </p>
+     <p id="ch9Using_Linux_Tools_11d">
+      Host-specific system-wide configuration files
+(the name comes from
+      <span class="emphasis">
+       <em>
+        et cetera
+       </em>
+      </span>
+      )
+     </p>
+     <p id="ch9Using_Linux_Tools_11e">
+      /home/
+     </p>
+     <p id="ch9Using_Linux_Tools_11f">
+      User's home directories, containing saved
 files, personal settings, etc.; often a
-separate partition.</p>
-<p><a name="ch9Using_Linux_Tools_120"></a>/lib/</p>
-<p><a name="ch9Using_Linux_Tools_121"></a>Libraries essential for the binaries in
-<span class="emphasis"><em>/bin/</em></span> and <span class="emphasis"><em>/sbin/</em></span></p>
-<p><a name="ch9Using_Linux_Tools_122"></a>/media/</p>
-<p><a name="ch9Using_Linux_Tools_123"></a>Mount points for removable media such as
-CD-ROMs, external hard disks, USB sticks, etc.</p>
-<p><a name="ch9Using_Linux_Tools_124"></a>/mnt/</p>
-<p><a name="ch9Using_Linux_Tools_125"></a>Temporarily mounted file systems</p>
-<p><a name="ch9Using_Linux_Tools_126"></a>/opt/</p>
-<p><a name="ch9Using_Linux_Tools_127"></a>Optional application software packages</p>
-<p><a name="ch9Using_Linux_Tools_128"></a>/proc/</p>
-<p><a name="ch9Using_Linux_Tools_129"></a>Virtual filesystem documenting kernel and
+separate partition.
+     </p>
+     <p id="ch9Using_Linux_Tools_120">
+      /lib/
+     </p>
+     <p id="ch9Using_Linux_Tools_121">
+      Libraries essential for the binaries in
+      <span class="emphasis">
+       <em>
+        /bin/
+       </em>
+      </span>
+      and
+      <span class="emphasis">
+       <em>
+        /sbin/
+       </em>
+      </span>
+     </p>
+     <p id="ch9Using_Linux_Tools_122">
+      /media/
+     </p>
+     <p id="ch9Using_Linux_Tools_123">
+      Mount points for removable media such as
+CD-ROMs, external hard disks, USB sticks, etc.
+     </p>
+     <p id="ch9Using_Linux_Tools_124">
+      /mnt/
+     </p>
+     <p id="ch9Using_Linux_Tools_125">
+      Temporarily mounted file systems
+     </p>
+     <p id="ch9Using_Linux_Tools_126">
+      /opt/
+     </p>
+     <p id="ch9Using_Linux_Tools_127">
+      Optional application software packages
+     </p>
+     <p id="ch9Using_Linux_Tools_128">
+      /proc/
+     </p>
+     <p id="ch9Using_Linux_Tools_129">
+      Virtual filesystem documenting kernel and
 process status as text files; e.g., uptime,
-network. In Linux, corresponds to a <span class="emphasis"><em>Procfs</em></span>
-mount.</p>
-<p><a name="ch9Using_Linux_Tools_12a"></a>/root/</p>
-<p><a name="ch9Using_Linux_Tools_12b"></a>Home directory for the root user</p>
-<p><a name="ch9Using_Linux_Tools_12c"></a>/sbin/</p>
-<p><a name="ch9Using_Linux_Tools_12d"></a>Essential system binaries; e.g., <span class="emphasis"><em>init</em></span>,
-<span class="emphasis"><em>route</em></span>, <span class="emphasis"><em>mount</em></span>.</p>
-<p><a name="ch9Using_Linux_Tools_12e"></a>/srv/</p>
-<p><a name="ch9Using_Linux_Tools_12f"></a>Site-specific data which is served by the
-system.</p>
-<p><a name="ch9Using_Linux_Tools_130"></a>/tmp/</p>
-<p><a name="ch9Using_Linux_Tools_131"></a>Temporary files. Often not preserved between
-system reboots.</p>
-<p><a name="ch9Using_Linux_Tools_132"></a>/usr/</p>
-<p><a name="ch9Using_Linux_Tools_133"></a>Secondary hierarchy for read-only user data;
+network. In Linux, corresponds to a
+      <span class="emphasis">
+       <em>
+        Procfs
+       </em>
+      </span>
+      mount.
+     </p>
+     <p id="ch9Using_Linux_Tools_12a">
+      /root/
+     </p>
+     <p id="ch9Using_Linux_Tools_12b">
+      Home directory for the root user
+     </p>
+     <p id="ch9Using_Linux_Tools_12c">
+      /sbin/
+     </p>
+     <p id="ch9Using_Linux_Tools_12d">
+      Essential system binaries; e.g.,
+      <span class="emphasis">
+       <em>
+        init
+       </em>
+      </span>
+      ,
+      <span class="emphasis">
+       <em>
+        route
+       </em>
+      </span>
+      ,
+      <span class="emphasis">
+       <em>
+        mount
+       </em>
+      </span>
+      .
+     </p>
+     <p id="ch9Using_Linux_Tools_12e">
+      /srv/
+     </p>
+     <p id="ch9Using_Linux_Tools_12f">
+      Site-specific data which is served by the
+system.
+     </p>
+     <p id="ch9Using_Linux_Tools_130">
+      /tmp/
+     </p>
+     <p id="ch9Using_Linux_Tools_131">
+      Temporary files. Often not preserved between
+system reboots.
+     </p>
+     <p id="ch9Using_Linux_Tools_132">
+      /usr/
+     </p>
+     <p id="ch9Using_Linux_Tools_133">
+      Secondary hierarchy for read-only user data;
 contains the majority of (multi-)user
-utilities and applications.</p>
-<p><a name="ch9Using_Linux_Tools_134"></a>/var/</p>
-<p><a name="ch9Using_Linux_Tools_135"></a>Variable files - files whose content is
+utilities and applications.
+     </p>
+     <p id="ch9Using_Linux_Tools_134">
+      /var/
+     </p>
+     <p id="ch9Using_Linux_Tools_135">
+      Variable files - files whose content is
 expected to continually change during normal
 operation of the system - such as logs, spool
 files, and temporary e-mail files.
-Sometimes a separate partition.</p>
-<div class="section" title="10.1. man hier">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="id2949602"></a>10.1. man hier</h3></div></div></div>
-<p><a name="ch9Using_Linux_Tools_136"></a>This is the manual page on the UNIX filesystem. The syntax for this is:</p>
-<pre class="programlisting">
-$ man hier</pre>
-</div>
-<div class="section" title="10.2. ls -l">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="id2949618"></a>10.2. ls -l</h3></div></div></div>
-<p><a name="ch9Using_Linux_Tools_137"></a>Shows you huge amounts of information (permissions, owners, size, and when last modified) for folders and files. The syntax is</p>
-<pre class="programlisting">
-$ ls -l</pre>
-<p><a name="ch9Using_Linux_Tools_138"></a>This can be done after entering the required directory.</p>
-</div>
-</div>
-<div class="section" title="11. Permissions and Ownership">
-<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="id2949641"></a>11. Permissions and Ownership</h2></div></div></div>
-<div class="section" title="11.1. chmod">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="id2949650"></a>11.1. chmod</h3></div></div></div>
-<p><a name="ch9Using_Linux_Tools_139"></a>The <span class="emphasis"><em>chmod</em></span> command (abbreviated from 'change mode') is a shell command and C language function in Unix and Unix-like environments. When executed, it can change file system modes of files and directories. The modes include permissions and special modes.A chmod command first appeared in AT&amp;T Unix version 1, and is still used today on Unix-like machines.</p>
-<div class="section" title="11.1.1. Usage">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="id2949676"></a>11.1.1. Usage</h4></div></div></div>
-<p><a name="ch9Using_Linux_Tools_13a"></a>The <span class="emphasis"><em>chmod</em></span> command options are specified like this:</p>
-<pre class="programlisting">
-$ chmod [options] mode[,mode] file1 [file2 ...]</pre>
-<p><a name="ch9Using_Linux_Tools_13b"></a>To view what the permissions currently are, type:</p>
-<pre class="programlisting">
-$ ls -l file</pre>
-</div>
-<div class="section" title="11.1.2. Command line options">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="id2949704"></a>11.1.2. Command line options</h4></div></div></div>
-<p><a name="ch9Using_Linux_Tools_13c"></a>The <span class="emphasis"><em>chmod</em></span> command has a number of command line options that affect its behavior. The most common options are:</p>
-<div class="itemizedlist"><ul class="itemizedlist" type="*">
-<li class="listitem" style="list-style-type: *"><p><a name="ch9Using_Linux_Tools_13d"></a>-R: Changes the modes of directories and files recursively</p></li>
-<li class="listitem" style="list-style-type: *"><p><a name="ch9Using_Linux_Tools_13e"></a>-v: Verbose mode; lists all files as they are being processed</p></li>
-</ul></div>
-<div class="section" title="11.1.2.1. Symbolic modes">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="id2949740"></a>11.1.2.1. Symbolic modes</h5></div></div></div>
-<p><a name="ch9Using_Linux_Tools_13f"></a>To the <span class="emphasis"><em>chmod</em></span> utility, all permissions and special modes are represented by its mode parameter. One way to adjust the mode of files or directories is to specify a symbolic mode. The symbolic mode is composed of three components, which are combined to form a single string of text:</p>
-<pre class="programlisting">
-$ chmod [references][operator][modes] file1 ...</pre>
-<p><a name="ch9Using_Linux_Tools_140"></a>The references (or classes) are used to distinguish the users to whom the permissions apply. If no references are specified it defaults to “all” but modifies only the permissions allowed by the umask. The references are represented by one or more of the following letters:</p>
-<p><a name="ch9Using_Linux_Tools_141"></a>Reference</p>
-<p><a name="ch9Using_Linux_Tools_142"></a>Class</p>
-<p><a name="ch9Using_Linux_Tools_143"></a>Description</p>
-<p><a name="ch9Using_Linux_Tools_144"></a>u</p>
-<p><a name="ch9Using_Linux_Tools_145"></a>user</p>
-<p><a name="ch9Using_Linux_Tools_146"></a>the owner of the file</p>
-<p><a name="ch9Using_Linux_Tools_147"></a>g</p>
-<p><a name="ch9Using_Linux_Tools_148"></a>group</p>
-<p><a name="ch9Using_Linux_Tools_149"></a>users who are members of the file's group</p>
-<p><a name="ch9Using_Linux_Tools_14a"></a>o</p>
-<p><a name="ch9Using_Linux_Tools_14b"></a>others</p>
-<p><a name="ch9Using_Linux_Tools_14c"></a>users who are not hte owner of the file or
-members of the group</p>
-<p><a name="ch9Using_Linux_Tools_14d"></a>a</p>
-<p><a name="ch9Using_Linux_Tools_14e"></a>all</p>
-<p><a name="ch9Using_Linux_Tools_14f"></a>all three of the above; is the same as <span class="emphasis"><em>ugo</em></span></p>
-<p><a name="ch9Using_Linux_Tools_150"></a>The <span class="emphasis"><em>chmod</em></span> program uses an operator to specify how the modes of a file should be adjusted. The following operators are accepted:</p>
-<p><a name="ch9Using_Linux_Tools_151"></a>Operator</p>
-<p><a name="ch9Using_Linux_Tools_152"></a>Description</p>
-<div class="itemizedlist">
-<span style="color: red">&lt;list_item&gt;&lt;/list_item&gt;</span><ul class="itemizedlist" type="*"></ul>
-</div>
-<p><a name="ch9Using_Linux_Tools_153"></a>adds the specified modes to the specified classes</p>
-<div class="itemizedlist">
-<span style="color: red">&lt;list_item&gt;&lt;/list_item&gt;</span><ul class="itemizedlist" type="*"></ul>
-</div>
-<p><a name="ch9Using_Linux_Tools_154"></a>removes the specified modes from the specified
-classes</p>
-<p><a name="ch9Using_Linux_Tools_155"></a>=</p>
-<p><a name="ch9Using_Linux_Tools_156"></a>the modes specified are to be made the exact modes
-for the specified classes</p>
-<p><a name="ch9Using_Linux_Tools_157"></a>The modes indicate which permissions are to be granted or taken away from the specified classes. There are three basic modes which correspond to the basic permissions:</p>
-<p><a name="ch9Using_Linux_Tools_158"></a>Mode</p>
-<p><a name="ch9Using_Linux_Tools_159"></a>Name</p>
-<p><a name="ch9Using_Linux_Tools_15a"></a>Description</p>
-<p><a name="ch9Using_Linux_Tools_15b"></a>r</p>
-<p><a name="ch9Using_Linux_Tools_15c"></a>read</p>
-<p><a name="ch9Using_Linux_Tools_15d"></a>read a file or list a directory's contents</p>
-<p><a name="ch9Using_Linux_Tools_15e"></a>w</p>
-<p><a name="ch9Using_Linux_Tools_15f"></a>write</p>
-<p><a name="ch9Using_Linux_Tools_160"></a>write to a file or directory</p>
-<p><a name="ch9Using_Linux_Tools_161"></a>x</p>
-<p><a name="ch9Using_Linux_Tools_162"></a>execute</p>
-<p><a name="ch9Using_Linux_Tools_163"></a>execute a file or recurse a directory tree</p>
-<p><a name="ch9Using_Linux_Tools_164"></a>X</p>
-<p><a name="ch9Using_Linux_Tools_165"></a>special
-execute</p>
-<p><a name="ch9Using_Linux_Tools_166"></a>which is not a permission in itself but rather
+Sometimes a separate partition.
+     </p>
+     <div class="section" title="10.1.man hier">
+      <div class="titlepage">
+       <div>
+        <div>
+         <h3 class="title">
+          <a name="id2628270">
+          </a>
+          10.1.man hier
+         </h3>
+        </div>
+       </div>
+      </div>
+      <p id="ch9Using_Linux_Tools_136">
+       This is the manual page on the UNIX filesystem. The syntax for this is:
+      </p>
+      <pre class="programlisting">
+       $ man hier
+      </pre>
+     </div>
+     <div class="section" title="10.2.ls -l">
+      <div class="titlepage">
+       <div>
+        <div>
+         <h3 class="title">
+          <a name="id2628287">
+          </a>
+          10.2.ls -l
+         </h3>
+        </div>
+       </div>
+      </div>
+      <p id="ch9Using_Linux_Tools_137">
+       Shows you huge amounts of information (permissions, owners, size, and when last modified) for folders and files. The syntax is
+      </p>
+      <pre class="programlisting">
+       $ ls -l
+      </pre>
+      <p id="ch9Using_Linux_Tools_138">
+       This can be done after entering the required directory.
+      </p>
+     </div>
+    </div>
+    <div class="section" title="11.Permissions and Ownership">
+     <div class="titlepage">
+      <div>
+       <div>
+        <h2 class="title" style="clear: both">
+         <a name="id2628310">
+         </a>
+         11.Permissions and Ownership
+        </h2>
+       </div>
+      </div>
+     </div>
+     <div class="section" title="11.1.chmod">
+      <div class="titlepage">
+       <div>
+        <div>
+         <h3 class="title">
+          <a name="id2628319">
+          </a>
+          11.1.chmod
+         </h3>
+        </div>
+       </div>
+      </div>
+      <p id="ch9Using_Linux_Tools_139">
+       The
+       <span class="emphasis">
+        <em>
+         chmod
+        </em>
+       </span>
+       command (abbreviated from 'change mode') is a shell command and C language function in Unix and Unix-like environments. When executed, it can change file system modes of files and directories. The modes include permissions and special modes.A chmod command first appeared in AT&amp;T Unix version 1, and is still used today on Unix-like machines.
+      </p>
+      <div class="section" title="11.1.1.Usage">
+       <div class="titlepage">
+        <div>
+         <div>
+          <h4 class="title">
+           <a name="id2628344">
+           </a>
+           11.1.1.Usage
+          </h4>
+         </div>
+        </div>
+       </div>
+       <p id="ch9Using_Linux_Tools_13a">
+        The
+        <span class="emphasis">
+         <em>
+          chmod
+         </em>
+        </span>
+        command options are specified like this:
+       </p>
+       <pre class="programlisting">
+        $ chmod [options] mode[,mode] file1 [file2 ...]
+       </pre>
+       <p id="ch9Using_Linux_Tools_13b">
+        To view what the permissions currently are, type:
+       </p>
+       <pre class="programlisting">
+        $ ls -l file
+       </pre>
+      </div>
+      <div class="section" title="11.1.2.Command line options">
+       <div class="titlepage">
+        <div>
+         <div>
+          <h4 class="title">
+           <a name="id2628373">
+           </a>
+           11.1.2.Command line options
+          </h4>
+         </div>
+        </div>
+       </div>
+       <p id="ch9Using_Linux_Tools_13c">
+        The
+        <span class="emphasis">
+         <em>
+          chmod
+         </em>
+        </span>
+        command has a number of command line options that affect its behavior. The most common options are:
+       </p>
+       <div class="itemizedlist">
+        <ul class="itemizedlist" type="*">
+         <li class="listitem" style="list-style-type: *">
+          <p id="ch9Using_Linux_Tools_13d">
+           -R: Changes the modes of directories and files recursively
+          </p>
+         </li>
+         <li class="listitem" style="list-style-type: *">
+          <p id="ch9Using_Linux_Tools_13e">
+           -v: Verbose mode; lists all files as they are being processed
+          </p>
+         </li>
+        </ul>
+       </div>
+       <div class="section" title="11.1.2.1.Symbolic modes">
+        <div class="titlepage">
+         <div>
+          <div>
+           <h5 class="title">
+            <a name="id2628408">
+            </a>
+            11.1.2.1.Symbolic modes
+           </h5>
+          </div>
+         </div>
+        </div>
+        <p id="ch9Using_Linux_Tools_13f">
+         To the
+         <span class="emphasis">
+          <em>
+           chmod
+          </em>
+         </span>
+         utility, all permissions and special modes are represented by its mode parameter. One way to adjust the mode of files or directories is to specify a symbolic mode. The symbolic mode is composed of three components, which are combined to form a single string of text:
+        </p>
+        <pre class="programlisting">
+         $ chmod [references][operator][modes] file1 ...
+        </pre>
+        <p id="ch9Using_Linux_Tools_140">
+         The references (or classes) are used to distinguish the users to whom the permissions apply. If no references are specified it defaults to all but modifies only the permissions allowed by the umask. The references are represented by one or more of the following letters:
+        </p>
+        <p id="ch9Using_Linux_Tools_141">
+         Reference
+        </p>
+        <p id="ch9Using_Linux_Tools_142">
+         Class
+        </p>
+        <p id="ch9Using_Linux_Tools_143">
+         Description
+        </p>
+        <p id="ch9Using_Linux_Tools_144">
+         u
+        </p>
+        <p id="ch9Using_Linux_Tools_145">
+         user
+        </p>
+        <p id="ch9Using_Linux_Tools_146">
+         the owner of the file
+        </p>
+        <p id="ch9Using_Linux_Tools_147">
+         g
+        </p>
+        <p id="ch9Using_Linux_Tools_148">
+         group
+        </p>
+        <p id="ch9Using_Linux_Tools_149">
+         users who are members of the file's group
+        </p>
+        <p id="ch9Using_Linux_Tools_14a">
+         o
+        </p>
+        <p id="ch9Using_Linux_Tools_14b">
+         others
+        </p>
+        <p id="ch9Using_Linux_Tools_14c">
+         users who are not hte owner of the file or
+members of the group
+        </p>
+        <p id="ch9Using_Linux_Tools_14d">
+         a
+        </p>
+        <p id="ch9Using_Linux_Tools_14e">
+         all
+        </p>
+        <p id="ch9Using_Linux_Tools_14f">
+         all three of the above; is the same as
+         <span class="emphasis">
+          <em>
+           ugo
+          </em>
+         </span>
+        </p>
+        <p id="ch9Using_Linux_Tools_150">
+         The
+         <span class="emphasis">
+          <em>
+           chmod
+          </em>
+         </span>
+         program uses an operator to specify how the modes of a file should be adjusted. The following operators are accepted:
+        </p>
+        <p id="ch9Using_Linux_Tools_151">
+         Operator
+        </p>
+        <p id="ch9Using_Linux_Tools_152">
+         Description
+        </p>
+        <div class="itemizedlist">
+         <span style="color: red">
+          &lt;list_item&gt;&lt;/list_item&gt;
+         </span>
+         <ul class="itemizedlist" type="*">
+         </ul>
+        </div>
+        <p id="ch9Using_Linux_Tools_153">
+         adds the specified modes to the specified classes
+        </p>
+        <div class="itemizedlist">
+         <span style="color: red">
+          &lt;list_item&gt;&lt;/list_item&gt;
+         </span>
+         <ul class="itemizedlist" type="*">
+         </ul>
+        </div>
+        <p id="ch9Using_Linux_Tools_154">
+         removes the specified modes from the specified
+classes
+        </p>
+        <p id="ch9Using_Linux_Tools_155">
+         =
+        </p>
+        <p id="ch9Using_Linux_Tools_156">
+         the modes specified are to be made the exact modes
+for the specified classes
+        </p>
+        <p id="ch9Using_Linux_Tools_157">
+         The modes indicate which permissions are to be granted or taken away from the specified classes. There are three basic modes which correspond to the basic permissions:
+        </p>
+        <p id="ch9Using_Linux_Tools_158">
+         Mode
+        </p>
+        <p id="ch9Using_Linux_Tools_159">
+         Name
+        </p>
+        <p id="ch9Using_Linux_Tools_15a">
+         Description
+        </p>
+        <p id="ch9Using_Linux_Tools_15b">
+         r
+        </p>
+        <p id="ch9Using_Linux_Tools_15c">
+         read
+        </p>
+        <p id="ch9Using_Linux_Tools_15d">
+         read a file or list a directory's contents
+        </p>
+        <p id="ch9Using_Linux_Tools_15e">
+         w
+        </p>
+        <p id="ch9Using_Linux_Tools_15f">
+         write
+        </p>
+        <p id="ch9Using_Linux_Tools_160">
+         write to a file or directory
+        </p>
+        <p id="ch9Using_Linux_Tools_161">
+         x
+        </p>
+        <p id="ch9Using_Linux_Tools_162">
+         execute
+        </p>
+        <p id="ch9Using_Linux_Tools_163">
+         execute a file or recurse a directory tree
+        </p>
+        <p id="ch9Using_Linux_Tools_164">
+         X
+        </p>
+        <p id="ch9Using_Linux_Tools_165">
+         special
+execute
+        </p>
+        <p id="ch9Using_Linux_Tools_166">
+         which is not a permission in itself but rather
 can be used instead of 'x'. It applies execute
 permissions to directories regardless of their
 current permissions and applies execute
@@ -1088,16 +4472,28 @@
 least 1 execute permission bit already set
 (either user, group or other). It is only
 really useful when used with '+' and usually
-in combination with the <span class="emphasis"><em>-R</em></span> option for giving
+in combination with the
+         <span class="emphasis">
+          <em>
+           -R
+          </em>
+         </span>
+         option for giving
 group or other access to a big directory tree
 without setting execute permission on normal
 files (such as text files), which would
 normally happen if one just used 'chmod -R
 a+rx .', whereas with 'X' one can do 'chmod -R
-a+rX .' instead.</p>
-<p><a name="ch9Using_Linux_Tools_167"></a>s</p>
-<p><a name="ch9Using_Linux_Tools_168"></a>setuid/gid</p>
-<p><a name="ch9Using_Linux_Tools_169"></a>are Unix access rights flags that allow users
+a+rX .' instead.
+        </p>
+        <p id="ch9Using_Linux_Tools_167">
+         s
+        </p>
+        <p id="ch9Using_Linux_Tools_168">
+         setuid/gid
+        </p>
+        <p id="ch9Using_Linux_Tools_169">
+         are Unix access rights flags that allow users
 to run an executable with the permissions of
 the executable's owner or group.They are often
 used to allow users on a computer system to run
@@ -1108,230 +4504,1000 @@
 specific.They are needed for tasks that require
 higher privileges than those which a common
 user has, such as changing his or her login
-password.</p>
-<p><a name="ch9Using_Linux_Tools_16a"></a>t</p>
-<p><a name="ch9Using_Linux_Tools_16b"></a>sticky</p>
-<p><a name="ch9Using_Linux_Tools_16c"></a>The most common use of the sticky bit today is
+password.
+        </p>
+        <p id="ch9Using_Linux_Tools_16a">
+         t
+        </p>
+        <p id="ch9Using_Linux_Tools_16b">
+         sticky
+        </p>
+        <p id="ch9Using_Linux_Tools_16c">
+         The most common use of the sticky bit today is
 on directories, where, when set, items inside
 the directory can be renamed or deleted only by
 the item's owner, the directory's owner, or the
 superuser; without the sticky bit set, any user
 with write and execute permissions for the
 directory can rename or delete contained files,
-regardless of owner.</p>
-<p><a name="ch9Using_Linux_Tools_16d"></a>The combination of these three components produces a string that is understood by the chmod command. Multiple changes can be specified by separating multiple symbolic modes with commas.</p>
-</div>
-<div class="section" title="11.1.2.2. Symbolic examples">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="id2945605"></a>11.1.2.2. Symbolic examples</h5></div></div></div>
-<p><a name="ch9Using_Linux_Tools_16e"></a>Add the 'read' and 'write' permissions to the 'user' and 'group' classes of a directory:</p>
-<pre class="programlisting">
-$ chmod ug+rw mydir
+regardless of owner.
+        </p>
+        <p id="ch9Using_Linux_Tools_16d">
+         The combination of these three components produces a string that is understood by the chmod command. Multiple changes can be specified by separating multiple symbolic modes with commas.
+        </p>
+       </div>
+       <div class="section" title="11.1.2.2.Symbolic examples">
+        <div class="titlepage">
+         <div>
+          <div>
+           <h5 class="title">
+            <a name="id2624274">
+            </a>
+            11.1.2.2.Symbolic examples
+           </h5>
+          </div>
+         </div>
+        </div>
+        <p id="ch9Using_Linux_Tools_16e">
+         Add the 'read' and 'write' permissions to the 'user' and 'group' classes of a directory:
+        </p>
+        <pre class="programlisting">
+         $ chmod ug+rw mydir
 $ ls -ld mydir
-drw-rw----   2 starwars  yoda  96 Dec 8 12:53 mydir</pre>
-<p><a name="ch9Using_Linux_Tools_16f"></a>For a file, remove <span class="emphasis"><em>write</em></span> permissions for all classes:</p>
-<pre class="programlisting">
-$ chmod a-w myfile
+drw-rw----   2 starwars  yoda  96 Dec 8 12:53 mydir
+        </pre>
+        <p id="ch9Using_Linux_Tools_16f">
+         For a file, remove
+         <span class="emphasis">
+          <em>
+           write
+          </em>
+         </span>
+         permissions for all classes:
+        </p>
+        <pre class="programlisting">
+         $ chmod a-w myfile
 $ ls -l myfile
--r-xr-xr-x   2 starwars  yoda 96 Dec 8 12:53 myfile</pre>
-<p><a name="ch9Using_Linux_Tools_170"></a>Set the permissions for the <span class="emphasis"><em>u*ser and the *g*roup to read and execute only (no write permission) on *mydir</em></span>.</p>
-<pre class="programlisting">
-$ chmod ug=rx mydir
+-r-xr-xr-x   2 starwars  yoda 96 Dec 8 12:53 myfile
+        </pre>
+        <p id="ch9Using_Linux_Tools_170">
+         Set the permissions for the
+         <span class="emphasis">
+          <em>
+           u*ser and the *g*roup to read and execute only (no write permission) on *mydir
+          </em>
+         </span>
+         .
+        </p>
+        <pre class="programlisting">
+         $ chmod ug=rx mydir
 $ ls -ld mydir
-dr-xr-x---   2 starwars  yoda 96 Dec 8 12:53 mydir</pre>
-</div>
-<div class="section" title="11.1.2.3. Octal numbers">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="id2945650"></a>11.1.2.3. Octal numbers</h5></div></div></div>
-<p><a name="ch9Using_Linux_Tools_171"></a>The <span class="emphasis"><em>chmod</em></span> command also accepts three and four-digit octal numbers representing modes. Using a three-digit octal number to set the modes of a file named myfile :</p>
-<pre class="programlisting">
-$ chmod 664 myfile
+dr-xr-x---   2 starwars  yoda 96 Dec 8 12:53 mydir
+        </pre>
+       </div>
+       <div class="section" title="11.1.2.3.Octal numbers">
+        <div class="titlepage">
+         <div>
+          <div>
+           <h5 class="title">
+            <a name="id2624319">
+            </a>
+            11.1.2.3.Octal numbers
+           </h5>
+          </div>
+         </div>
+        </div>
+        <p id="ch9Using_Linux_Tools_171">
+         The
+         <span class="emphasis">
+          <em>
+           chmod
+          </em>
+         </span>
+         command also accepts three and four-digit octal numbers representing modes. Using a three-digit octal number to set the modes of a file named myfile :
+        </p>
+        <pre class="programlisting">
+         $ chmod 664 myfile
 $ ls -l myfile
--rw-rw-r--  1   57 Jul  3 10:13  myfile</pre>
-<p><a name="ch9Using_Linux_Tools_172"></a>Since the <span class="emphasis"><em>setuid</em></span>, <span class="emphasis"><em>setgid</em></span> and <span class="emphasis"><em>sticky</em></span> bits are not set, this is equivalent to:</p>
-<pre class="programlisting">
-$ chmod 0664 myfile</pre>
-</div>
-<div class="section" title="11.1.2.4. Special modes">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="id2950277"></a>11.1.2.4. Special modes</h5></div></div></div>
-<p><a name="ch9Using_Linux_Tools_173"></a>The <span class="emphasis"><em>chmod</em></span> command is also capable of changing the additional permissions or special modes of a file or directory. The symbolic modes use <span class="strong"><strong>s</strong></span> to represent the <span class="emphasis"><em>setuid</em></span> and <span class="emphasis"><em>setgid</em></span> modes, and <span class="strong"><strong>t</strong></span> to represent the sticky mode. The modes are only applied to the appropriate classes, regardless of whether or not other classes are specified.</p>
-<p><a name="ch9Using_Linux_Tools_174"></a>Most operating systems support the specification of special modes using octal modes, but some do not. On these systems, only the symbolic modes can be used.</p>
-</div>
-</div>
-</div>
-</div>
-<div class="section" title="12. Redirection and Piping">
-<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="id2945091"></a>12. Redirection and Piping</h2></div></div></div>
-<p><a name="ch9Using_Linux_Tools_175"></a>In computing, <span class="emphasis"><em>redirection</em></span> is a function common to most command-line interpreters, including the various Unix shells that can redirect standard streams to user-specified locations.</p>
-<p><a name="ch9Using_Linux_Tools_176"></a>Programs do redirection with the <span class="emphasis"><em>dup2(2)</em></span> system call, or its less-flexible but higher-level stdio analogues, <span class="emphasis"><em>freopen(3)</em></span> and <span class="emphasis"><em>popen(3)</em></span>.</p>
-<div class="section" title="12.1. Redirecting standard input and standard output">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="id2950576"></a>12.1. Redirecting standard input and standard output</h3></div></div></div>
-<p><a name="ch9Using_Linux_Tools_177"></a>Redirection is usually implemented by placing certain characters between commands. Typically, the syntax of these characters is as follows:</p>
-<pre class="programlisting">
-$ command1 &gt; file1</pre>
-<p><a name="ch9Using_Linux_Tools_178"></a>executes <span class="emphasis"><em>command1</em></span>, placing the output in file1. Note that this will truncate any existing data in <span class="emphasis"><em>file1</em></span>. To append output to the end of the file, use the &gt;&gt; operator.:</p>
-<pre class="programlisting">
-$ command1 &lt; file1</pre>
-<p><a name="ch9Using_Linux_Tools_179"></a>executes <span class="emphasis"><em>command1</em></span>, using <span class="emphasis"><em>file1</em></span> as the source of input (as opposed to the keyboard).:</p>
-<pre class="programlisting">
-$ command1 &lt; infile &gt; outfile</pre>
-<p><a name="ch9Using_Linux_Tools_17a"></a>combines the two capabilities: <span class="emphasis"><em>command1</em></span> reads from <span class="emphasis"><em>infile</em></span> and writes to <span class="emphasis"><em>outfile</em></span></p>
-</div>
-<div class="section" title="12.2. Piping">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="id2950645"></a>12.2. Piping</h3></div></div></div>
-<p><a name="ch9Using_Linux_Tools_17b"></a>Programs can be run together such that one program reads the output from another with no need for an explicit intermediate file:
-A pipeline of three programs run on a text terminal:</p>
-<pre class="programlisting">
-$ command1 | command2</pre>
-<p><a name="ch9Using_Linux_Tools_17c"></a>executes <span class="emphasis"><em>command1</em></span>, using its output as the input for <span class="emphasis"><em>command2</em></span> (commonly called piping, since the "|" character is known as a "pipe").</p>
-<p><a name="ch9Using_Linux_Tools_17d"></a>This is equivalent to using two redirects and a temporary file:</p>
-<pre class="programlisting">
-$ command1 &gt; tempfile
+-rw-rw-r--  1   57 Jul  3 10:13  myfile
+        </pre>
+        <p id="ch9Using_Linux_Tools_172">
+         Since the
+         <span class="emphasis">
+          <em>
+           setuid
+          </em>
+         </span>
+         ,
+         <span class="emphasis">
+          <em>
+           setgid
+          </em>
+         </span>
+         and
+         <span class="emphasis">
+          <em>
+           sticky
+          </em>
+         </span>
+         bits are not set, this is equivalent to:
+        </p>
+        <pre class="programlisting">
+         $ chmod 0664 myfile
+        </pre>
+       </div>
+       <div class="section" title="11.1.2.4.Special modes">
+        <div class="titlepage">
+         <div>
+          <div>
+           <h5 class="title">
+            <a name="id2628946">
+            </a>
+            11.1.2.4.Special modes
+           </h5>
+          </div>
+         </div>
+        </div>
+        <p id="ch9Using_Linux_Tools_173">
+         The
+         <span class="emphasis">
+          <em>
+           chmod
+          </em>
+         </span>
+         command is also capable of changing the additional permissions or special modes of a file or directory. The symbolic modes use
+         <span class="strong">
+          <strong>
+           s
+          </strong>
+         </span>
+         to represent the
+         <span class="emphasis">
+          <em>
+           setuid
+          </em>
+         </span>
+         and
+         <span class="emphasis">
+          <em>
+           setgid
+          </em>
+         </span>
+         modes, and
+         <span class="strong">
+          <strong>
+           t
+          </strong>
+         </span>
+         to represent the sticky mode. The modes are only applied to the appropriate classes, regardless of whether or not other classes are specified.
+        </p>
+        <p id="ch9Using_Linux_Tools_174">
+         Most operating systems support the specification of special modes using octal modes, but some do not. On these systems, only the symbolic modes can be used.
+        </p>
+       </div>
+      </div>
+     </div>
+    </div>
+    <div class="section" title="12.Redirection and Piping">
+     <div class="titlepage">
+      <div>
+       <div>
+        <h2 class="title" style="clear: both">
+         <a name="id2623759">
+         </a>
+         12.Redirection and Piping
+        </h2>
+       </div>
+      </div>
+     </div>
+     <p id="ch9Using_Linux_Tools_175">
+      In computing,
+      <span class="emphasis">
+       <em>
+        redirection
+       </em>
+      </span>
+      is a function common to most command-line interpreters, including the various Unix shells that can redirect standard streams to user-specified locations.
+     </p>
+     <p id="ch9Using_Linux_Tools_176">
+      Programs do redirection with the
+      <span class="emphasis">
+       <em>
+        dup2(2)
+       </em>
+      </span>
+      system call, or its less-flexible but higher-level stdio analogues,
+      <span class="emphasis">
+       <em>
+        freopen(3)
+       </em>
+      </span>
+      and
+      <span class="emphasis">
+       <em>
+        popen(3)
+       </em>
+      </span>
+      .
+     </p>
+     <div class="section" title="12.1.Redirecting standard input and standard output">
+      <div class="titlepage">
+       <div>
+        <div>
+         <h3 class="title">
+          <a name="id2629245">
+          </a>
+          12.1.Redirecting standard input and standard output
+         </h3>
+        </div>
+       </div>
+      </div>
+      <p id="ch9Using_Linux_Tools_177">
+       Redirection is usually implemented by placing certain characters between commands. Typically, the syntax of these characters is as follows:
+      </p>
+      <pre class="programlisting">
+       $ command1 &gt; file1
+      </pre>
+      <p id="ch9Using_Linux_Tools_178">
+       executes
+       <span class="emphasis">
+        <em>
+         command1
+        </em>
+       </span>
+       , placing the output in file1. Note that this will truncate any existing data in
+       <span class="emphasis">
+        <em>
+         file1
+        </em>
+       </span>
+       . To append output to the end of the file, use the &gt;&gt; operator.:
+      </p>
+      <pre class="programlisting">
+       $ command1 &lt; file1
+      </pre>
+      <p id="ch9Using_Linux_Tools_179">
+       executes
+       <span class="emphasis">
+        <em>
+         command1
+        </em>
+       </span>
+       , using
+       <span class="emphasis">
+        <em>
+         file1
+        </em>
+       </span>
+       as the source of input (as opposed to the keyboard).:
+      </p>
+      <pre class="programlisting">
+       $ command1 &lt; infile &gt; outfile
+      </pre>
+      <p id="ch9Using_Linux_Tools_17a">
+       combines the two capabilities:
+       <span class="emphasis">
+        <em>
+         command1
+        </em>
+       </span>
+       reads from
+       <span class="emphasis">
+        <em>
+         infile
+        </em>
+       </span>
+       and writes to
+       <span class="emphasis">
+        <em>
+         outfile
+        </em>
+       </span>
+      </p>
+     </div>
+     <div class="section" title="12.2.Piping">
+      <div class="titlepage">
+       <div>
+        <div>
+         <h3 class="title">
+          <a name="id2629314">
+          </a>
+          12.2.Piping
+         </h3>
+        </div>
+       </div>
+      </div>
+      <p id="ch9Using_Linux_Tools_17b">
+       Programs can be run together such that one program reads the output from another with no need for an explicit intermediate file:
+A pipeline of three programs run on a text terminal:
+      </p>
+      <pre class="programlisting">
+       $ command1 | command2
+      </pre>
+      <p id="ch9Using_Linux_Tools_17c">
+       executes
+       <span class="emphasis">
+        <em>
+         command1
+        </em>
+       </span>
+       , using its output as the input for
+       <span class="emphasis">
+        <em>
+         command2
+        </em>
+       </span>
+       (commonly called piping, since the "|" character is known as a "pipe").
+      </p>
+      <p id="ch9Using_Linux_Tools_17d">
+       This is equivalent to using two redirects and a temporary file:
+      </p>
+      <pre class="programlisting">
+       $ command1 &gt; tempfile
 $ command2 &lt; tempfile
-$ rm tempfile</pre>
-<p><a name="ch9Using_Linux_Tools_17e"></a>A good example for command piping is combining <span class="emphasis"><em>echo</em></span> with another command to achieve something interactive in a non-interactive shell, e.g.:</p>
-<pre class="programlisting">
-$ echo -e "user npass" | ftp localhost</pre>
-<p><a name="ch9Using_Linux_Tools_17f"></a>This runs the ftp client with input user, press return, then pass.</p>
-</div>
-<div class="section" title="12.3. Redirecting to and from the standard file handles">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="id2950707"></a>12.3. Redirecting to and from the standard file handles</h3></div></div></div>
-<p><a name="ch9Using_Linux_Tools_180"></a>In Unix shells derived from the original Bourne shell, the first two actions can be further modified by placing a number (the file descriptor) immediately before the character; this will affect which stream is used for the redirection. The Unix standard I/O streams are:</p>
-<p><a name="ch9Using_Linux_Tools_181"></a>Handle</p>
-<p><a name="ch9Using_Linux_Tools_182"></a>Name</p>
-<p><a name="ch9Using_Linux_Tools_183"></a>Description</p>
-<p><a name="ch9Using_Linux_Tools_184"></a>0</p>
-<p><a name="ch9Using_Linux_Tools_185"></a>stdin</p>
-<p><a name="ch9Using_Linux_Tools_186"></a>Standard input</p>
-<p><a name="ch9Using_Linux_Tools_187"></a>1</p>
-<p><a name="ch9Using_Linux_Tools_188"></a>stdout</p>
-<p><a name="ch9Using_Linux_Tools_189"></a>Standard output</p>
-<p><a name="ch9Using_Linux_Tools_18a"></a>2</p>
-<p><a name="ch9Using_Linux_Tools_18b"></a>stderr</p>
-<p><a name="ch9Using_Linux_Tools_18c"></a>Standard error</p>
-<p><a name="ch9Using_Linux_Tools_18d"></a>For example:</p>
-<pre class="programlisting">
-$ command1 2&gt; file1</pre>
-<p><a name="ch9Using_Linux_Tools_18e"></a>executes <span class="emphasis"><em>command1</em></span>, directing the standard error stream to <span class="emphasis"><em>file1</em></span>.</p>
-<p><a name="ch9Using_Linux_Tools_18f"></a>In shells derived from <span class="emphasis"><em>csh</em></span> (the C shell), the syntax instead appends the &amp; character to the redirect characters, thus achieving a similar result.</p>
-<p><a name="ch9Using_Linux_Tools_190"></a>Another useful capability is to redirect one standard file handle to another. The most popular variation is to merge standard error into standard output so error messages can be processed together with (or alternately to) the usual output. Example:</p>
-<pre class="programlisting">
-$ find / -name .profile &gt; results 2&gt;&amp;1</pre>
-<p><a name="ch9Using_Linux_Tools_191"></a>will try to find all files named <span class="emphasis"><em>.profile</em></span>. Executed without redirection, it will output hits to <span class="emphasis"><em>stdout</em></span> and errors (e.g. for lack of privilege to traverse protected directories) to <span class="emphasis"><em>stderr</em></span>. If standard output is directed to file results, error messages appear on the console. To see both hits and error messages in file results, merge <span class="emphasis"><em>stderr</em></span> (handle 2) into <span class="emphasis"><em>stdout</em></span> (handle 1) using 2&gt;&amp;1 .</p>
-<p><a name="ch9Using_Linux_Tools_192"></a>It's possible use 2&gt;&amp;1 before "&gt;" but it doesn't work. In fact, when the interpreter reads 2&gt;&amp;1, it doesn't know yet where standard output is redirected and then standard error isn't merged.</p>
-<p><a name="ch9Using_Linux_Tools_193"></a>If the merged output is to be piped into another program, the file merge sequence 2&gt;&amp;1 must precede the pipe symbol, thus:</p>
-<pre class="programlisting">
-$ find / -name .profile 2&gt;&amp;1 | less</pre>
-<p><a name="ch9Using_Linux_Tools_194"></a>A simplified form of the command:</p>
-<pre class="programlisting">
-$ command &gt; file 2&gt;&amp;1</pre>
-<p><a name="ch9Using_Linux_Tools_195"></a>is:</p>
-<pre class="programlisting">
-$ command &amp;&gt;file</pre>
-<p><a name="ch9Using_Linux_Tools_196"></a>or:</p>
-<pre class="programlisting">
-$command &gt;&amp;file</pre>
-</div>
-<div class="section" title="12.4. Chained pipelines">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="id2950901"></a>12.4. Chained pipelines</h3></div></div></div>
-<p><a name="ch9Using_Linux_Tools_197"></a>The redirection and piping tokens can be chained together to create complex commands. For example:</p>
-<pre class="programlisting">
-$ ls | grep ' .sh' | sort &gt; shlist</pre>
-<p><a name="ch9Using_Linux_Tools_198"></a>lists the contents of the current directory, where this output is filtered to only contain lines which contain <span class="emphasis"><em>.sh</em></span>, sort this resultant output lexicographically, and place the final output in <span class="emphasis"><em>shlist</em></span>. This type of construction is used very commonly in shell scripts and batch files.</p>
-</div>
-<div class="section" title="12.5. Redirect to multiple outputs">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="id2950934"></a>12.5. Redirect to multiple outputs</h3></div></div></div>
-<p><a name="ch9Using_Linux_Tools_199"></a>The standard command <span class="emphasis"><em>tee</em></span> can redirect output from a command to several destinations.</p>
-<pre class="programlisting">
-$ ls -lrt | tee xyz</pre>
-<p><a name="ch9Using_Linux_Tools_19a"></a>This directs the file list output to both standard output as well as to the file <span class="emphasis"><em>xyz</em></span>.</p>
-</div>
-</div>
-<div class="section" title="13. More Text Processing">
-<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="id2950964"></a>13. More Text Processing</h2></div></div></div>
-<div class="section" title="13.1. grep">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="id2950973"></a>13.1. grep</h3></div></div></div>
-<p><a name="ch9Using_Linux_Tools_19b"></a><span class="emphasis"><em>grep</em></span> is a command line text search utility originally written for Unix. The name is taken from the first letters in <span class="emphasis"><em>global / regular expression / print</em></span>, a series of instructions for the <span class="emphasis"><em>ed</em></span> text editor. The <span class="emphasis"><em>grep</em></span> command searches files or standard input globally for lines matching a given regular expression, and prints them to the program's standard output.</p>
-<div class="section" title="13.1.1. Usage">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="id2951004"></a>13.1.1. Usage</h4></div></div></div>
-<p><a name="ch9Using_Linux_Tools_19c"></a>This is an example of a common <span class="emphasis"><em>grep</em></span> usage:</p>
-<pre class="programlisting">
-$ grep apple fruitlist.txt</pre>
-<p><a name="ch9Using_Linux_Tools_19d"></a>In this case, <span class="emphasis"><em>grep</em></span> prints all lines containing 'apple' from the file <span class="emphasis"><em>fruitlist.txt</em></span>, regardless of word boundaries; therefore lines containing 'pineapple' or 'apples' are also printed. The <span class="emphasis"><em>grep</em></span> command is case sensitive by default, so this example's output does not include lines containing 'Apple' (with a capital A) unless they also contain 'apple'.</p>
-<p><a name="ch9Using_Linux_Tools_19e"></a>Like most Unix commands, <span class="emphasis"><em>grep</em></span> accepts command line arguments to change this and many other behaviors. For example:</p>
-<pre class="programlisting">
-$ grep -i apple fruitlist.txt</pre>
-<p><a name="ch9Using_Linux_Tools_19f"></a>This prints all lines containing 'apple' regardless of capitalization. The '-i' argument tells <span class="emphasis"><em>grep</em></span> to be case insensitive, or to ignore case.</p>
-<p><a name="ch9Using_Linux_Tools_1a0"></a>To print all lines containing 'apple' as a word ('pineapple' and 'apples' will not match):</p>
-<pre class="programlisting">
-$ grep -w apple fruitlist.txt</pre>
-<p><a name="ch9Using_Linux_Tools_1a1"></a>Regular expressions can be used to match more complicated queries.</p>
-<div class="section" title="13.1.1.1. Variations">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="id2951083"></a>13.1.1.1. Variations</h5></div></div></div>
-<p><a name="ch9Using_Linux_Tools_1a2"></a>There are countless implementations and derivatives of <span class="emphasis"><em>grep</em></span> available for many operating systems. Early variants of <span class="emphasis"><em>grep</em></span> included <span class="emphasis"><em>egrep</em></span> and <span class="emphasis"><em>fgrep</em></span>. The former applies an extended regular expression syntax that was added to Unix after Ken Thompson's original regular expression implementation. The latter searches for any of a list of 'fixed' strings using the Aho-Corasick algorithm. These variants are embodied in most modern <span class="emphasis"><em>grep</em></span> implementations as command-line switches (and standardized as -E and -F in POSIX). In such combined implementations, <span class="emphasis"><em>grep</em></span> may also behave differently depending on the name by which it is invoked, allowing <span class="emphasis"><em>fgrep</em></span>, <span class="emphasis"><em>egrep</em></span>, and <span class="emphasis"><em>grep</em></span> to be links to the same program.</p>
-<p><a name="ch9Using_Linux_Tools_1a3"></a><span class="emphasis"><em>pcregrep</em></span> is an implementation of <span class="emphasis"><em>grep</em></span> that uses Perl regular expression syntax.</p>
-<p><a name="ch9Using_Linux_Tools_1a4"></a>Other commands contain the word 'grep' to indicate that they search (usually for regular expression matches). The <span class="emphasis"><em>pgrep</em></span> utility, for instance, displays the processes whose names match a given regular expression.</p>
-</div>
-</div>
-</div>
-<div class="section" title="13.2. tr">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="id2951162"></a>13.2. tr</h3></div></div></div>
-<p><a name="ch9Using_Linux_Tools_1a5"></a><span class="emphasis"><em>tr</em></span> (abbreviated from <span class="emphasis"><em>translate</em></span> or <span class="emphasis"><em>transliterate</em></span>) is a command in Unix-like operating systems.</p>
-<p><a name="ch9Using_Linux_Tools_1a6"></a>When executed, the program reads from the standard input and writes to the standard output. It takes as parameters two sets of characters, and replaces occurrences of the characters in the first set with the corresponding elements from the other set. For example,</p>
-<pre class="programlisting">
-$ tr 'abcd' 'jkmn'</pre>
-<p><a name="ch9Using_Linux_Tools_1a7"></a>maps 'a' to 'j', 'b' to 'k', 'c' to 'm', and 'd' to 'n'.</p>
-<p><a name="ch9Using_Linux_Tools_1a8"></a>Sets of characters may be abbreviated by using character ranges. The previous example could be written:</p>
-<pre class="programlisting">
-$ tr 'a-d' 'jkmn'</pre>
-<p><a name="ch9Using_Linux_Tools_1a9"></a>In POSIX compliant versions of <span class="emphasis"><em>tr</em></span> the set represented by a character range depends on the locale's collating order, so it is safer to avoid character ranges in scripts that might be executed in a locale different from that in which they were written. Ranges can often be replaced with POSIX character sets such as [:alpha:].</p>
-<p><a name="ch9Using_Linux_Tools_1aa"></a>The <span class="emphasis"><em>-c</em></span> flag complements the first set of characters.</p>
-<pre class="programlisting">
-$ tr -cd '[:alnum:]'</pre>
-<p><a name="ch9Using_Linux_Tools_1ab"></a>therefore removes all non-alphanumeric characters.</p>
-<p><a name="ch9Using_Linux_Tools_1ac"></a>The <span class="emphasis"><em>-s</em></span> flag causes tr to compress sequences of identical adjacent characters in its output to a single token. For example,</p>
-<pre class="programlisting">
-$ tr -s ' n' ' n'</pre>
-<p><a name="ch9Using_Linux_Tools_1ad"></a>replaces sequences of one or more newline characters with a single newline.</p>
-<p><a name="ch9Using_Linux_Tools_1ae"></a>The <span class="emphasis"><em>-d</em></span> flag causes tr to delete all tokens of the specified set of characters from its input. In this case, only a single character set argument is used. The following command removes carriage return characters, thereby converting a file in DOS/Windows format to one in Unix format.</p>
-<pre class="programlisting">
-$ tr -d ' r'</pre>
-<p><a name="ch9Using_Linux_Tools_1af"></a>Most versions of <span class="emphasis"><em>tr</em></span>, including GNU <span class="emphasis"><em>tr</em></span> and classic Unix <span class="emphasis"><em>tr</em></span>, operate on single byte characters and are not Unicode compliant. An exception is the Heirloom Toolchest implementation, which provides basic Unicode support.</p>
-<p><a name="ch9Using_Linux_Tools_1b0"></a>Ruby and Perl also have an internal <span class="emphasis"><em>tr</em></span> operator, which operates analogously. Tcl's <span class="emphasis"><em>string map</em></span> command is more general in that it maps strings to strings while <span class="emphasis"><em>tr</em></span> maps characters to characters.</p>
-</div>
-</div>
-<div class="section" title="14. Elementary Regex">
-<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="id2951309"></a>14. Elementary Regex</h2></div></div></div>
-<p><a name="ch9Using_Linux_Tools_1b1"></a>In computing, regular expressions provide a concise and flexible means for identifying strings of text of interest, such as particular characters, words, or patterns of characters. A regular expression (often shortened to regex or regexp) is written in a formal language that can be interpreted by a regular expression processor, a program that either serves as a parser generator or examines text and identifies parts that match the provided specification.</p>
-<p><a name="ch9Using_Linux_Tools_1b2"></a>Regular expressions are used by many text editors, utilities, and programming languages to search and manipulate text based on patterns. For example, Perl, Ruby and Tcl have a powerful regular expression engine built directly into their syntax. Several utilities provided by Unix distributions—including the editor <span class="emphasis"><em>ed</em></span> and the filter <span class="emphasis"><em>grep</em></span> — were the first to popularize the concept of regular expressions.</p>
-<p><a name="ch9Using_Linux_Tools_1b3"></a>Traditional Unix regular expression syntax followed common conventions but often differed from tool to tool. The IEEE POSIX <span class="emphasis"><em>Basic Regular Expressions</em></span> (BRE) standard (released alongside an alternative flavor called Extended Regular Expressions or ERE) was designed mostly for backward compatibility with the traditional (Simple Regular Expression) syntax but provided a common standard which has since been adopted as the default syntax of many Unix regular expression tools, though there is often some variation or additional features. Many such tools also provide support for ERE syntax with command line arguments.</p>
-<p><a name="ch9Using_Linux_Tools_1b4"></a>In the BRE syntax, most characters are treated as literals — they match only themselves (i.e., a matches "a"). The exceptions, listed below, are called metacharacters or metasequences.</p>
-<p><a name="ch9Using_Linux_Tools_1b5"></a>Metacharacter</p>
-<p><a name="ch9Using_Linux_Tools_1b6"></a>Description</p>
-<p><a name="ch9Using_Linux_Tools_1b7"></a>.</p>
-<p><a name="ch9Using_Linux_Tools_1b8"></a>Matches any single character (many applications exclude
+$ rm tempfile
+      </pre>
+      <p id="ch9Using_Linux_Tools_17e">
+       A good example for command piping is combining
+       <span class="emphasis">
+        <em>
+         echo
+        </em>
+       </span>
+       with another command to achieve something interactive in a non-interactive shell, e.g.:
+      </p>
+      <pre class="programlisting">
+       $ echo -e "user npass" | ftp localhost
+      </pre>
+      <p id="ch9Using_Linux_Tools_17f">
+       This runs the ftp client with input user, press return, then pass.
+      </p>
+     </div>
+     <div class="section" title="12.3.Redirecting to and from the standard file handles">
+      <div class="titlepage">
+       <div>
+        <div>
+         <h3 class="title">
+          <a name="id2629376">
+          </a>
+          12.3.Redirecting to and from the standard file handles
+         </h3>
+        </div>
+       </div>
+      </div>
+      <p id="ch9Using_Linux_Tools_180">
+       In Unix shells derived from the original Bourne shell, the first two actions can be further modified by placing a number (the file descriptor) immediately before the character; this will affect which stream is used for the redirection. The Unix standard I/O streams are:
+      </p>
+      <p id="ch9Using_Linux_Tools_181">
+       Handle
+      </p>
+      <p id="ch9Using_Linux_Tools_182">
+       Name
+      </p>
+      <p id="ch9Using_Linux_Tools_183">
+       Description
+      </p>
+      <p id="ch9Using_Linux_Tools_184">
+       0
+      </p>
+      <p id="ch9Using_Linux_Tools_185">
+       stdin
+      </p>
+      <p id="ch9Using_Linux_Tools_186">
+       Standard input
+      </p>
+      <p id="ch9Using_Linux_Tools_187">
+       1
+      </p>
+      <p id="ch9Using_Linux_Tools_188">
+       stdout
+      </p>
+      <p id="ch9Using_Linux_Tools_189">
+       Standard output
+      </p>
+      <p id="ch9Using_Linux_Tools_18a">
+       2
+      </p>
+      <p id="ch9Using_Linux_Tools_18b">
+       stderr
+      </p>
+      <p id="ch9Using_Linux_Tools_18c">
+       Standard error
+      </p>
+      <p id="ch9Using_Linux_Tools_18d">
+       For example:
+      </p>
+      <pre class="programlisting">
+       $ command1 2&gt; file1
+      </pre>
+      <p id="ch9Using_Linux_Tools_18e">
+       executes
+       <span class="emphasis">
+        <em>
+         command1
+        </em>
+       </span>
+       , directing the standard error stream to
+       <span class="emphasis">
+        <em>
+         file1
+        </em>
+       </span>
+       .
+      </p>
+      <p id="ch9Using_Linux_Tools_18f">
+       In shells derived from
+       <span class="emphasis">
+        <em>
+         csh
+        </em>
+       </span>
+       (the C shell), the syntax instead appends the &amp; character to the redirect characters, thus achieving a similar result.
+      </p>
+      <p id="ch9Using_Linux_Tools_190">
+       Another useful capability is to redirect one standard file handle to another. The most popular variation is to merge standard error into standard output so error messages can be processed together with (or alternately to) the usual output. Example:
+      </p>
+      <pre class="programlisting">
+       $ find / -name .profile &gt; results 2&gt;&amp;1
+      </pre>
+      <p id="ch9Using_Linux_Tools_191">
+       will try to find all files named
+       <span class="emphasis">
+        <em>
+         .profile
+        </em>
+       </span>
+       . Executed without redirection, it will output hits to
+       <span class="emphasis">
+        <em>
+         stdout
+        </em>
+       </span>
+       and errors (e.g. for lack of privilege to traverse protected directories) to
+       <span class="emphasis">
+        <em>
+         stderr
+        </em>
+       </span>
+       . If standard output is directed to file results, error messages appear on the console. To see both hits and error messages in file results, merge
+       <span class="emphasis">
+        <em>
+         stderr
+        </em>
+       </span>
+       (handle 2) into
+       <span class="emphasis">
+        <em>
+         stdout
+        </em>
+       </span>
+       (handle 1) using 2&gt;&amp;1 .
+      </p>
+      <p id="ch9Using_Linux_Tools_192">
+       It's possible use 2&gt;&amp;1 before "&gt;" but it doesn't work. In fact, when the interpreter reads 2&gt;&amp;1, it doesn't know yet where standard output is redirected and then standard error isn't merged.
+      </p>
+      <p id="ch9Using_Linux_Tools_193">
+       If the merged output is to be piped into another program, the file merge sequence 2&gt;&amp;1 must precede the pipe symbol, thus:
+      </p>
+      <pre class="programlisting">
+       $ find / -name .profile 2&gt;&amp;1 | less
+      </pre>
+      <p id="ch9Using_Linux_Tools_194">
+       A simplified form of the command:
+      </p>
+      <pre class="programlisting">
+       $ command &gt; file 2&gt;&amp;1
+      </pre>
+      <p id="ch9Using_Linux_Tools_195">
+       is:
+      </p>
+      <pre class="programlisting">
+       $ command &amp;&gt;file
+      </pre>
+      <p id="ch9Using_Linux_Tools_196">
+       or:
+      </p>
+      <pre class="programlisting">
+       $command &gt;&amp;file
+      </pre>
+     </div>
+     <div class="section" title="12.4.Chained pipelines">
+      <div class="titlepage">
+       <div>
+        <div>
+         <h3 class="title">
+          <a name="id2629569">
+          </a>
+          12.4.Chained pipelines
+         </h3>
+        </div>
+       </div>
+      </div>
+      <p id="ch9Using_Linux_Tools_197">
+       The redirection and piping tokens can be chained together to create complex commands. For example:
+      </p>
+      <pre class="programlisting">
+       $ ls | grep ' .sh' | sort &gt; shlist
+      </pre>
+      <p id="ch9Using_Linux_Tools_198">
+       lists the contents of the current directory, where this output is filtered to only contain lines which contain
+       <span class="emphasis">
+        <em>
+         .sh
+        </em>
+       </span>
+       , sort this resultant output lexicographically, and place the final output in
+       <span class="emphasis">
+        <em>
+         shlist
+        </em>
+       </span>
+       . This type of construction is used very commonly in shell scripts and batch files.
+      </p>
+     </div>
+     <div class="section" title="12.5.Redirect to multiple outputs">
+      <div class="titlepage">
+       <div>
+        <div>
+         <h3 class="title">
+          <a name="id2629602">
+          </a>
+          12.5.Redirect to multiple outputs
+         </h3>
+        </div>
+       </div>
+      </div>
+      <p id="ch9Using_Linux_Tools_199">
+       The standard command
+       <span class="emphasis">
+        <em>
+         tee
+        </em>
+       </span>
+       can redirect output from a command to several destinations.
+      </p>
+      <pre class="programlisting">
+       $ ls -lrt | tee xyz
+      </pre>
+      <p id="ch9Using_Linux_Tools_19a">
+       This directs the file list output to both standard output as well as to the file
+       <span class="emphasis">
+        <em>
+         xyz
+        </em>
+       </span>
+       .
+      </p>
+     </div>
+    </div>
+    <div class="section" title="13.More Text Processing">
+     <div class="titlepage">
+      <div>
+       <div>
+        <h2 class="title" style="clear: both">
+         <a name="id2629633">
+         </a>
+         13.More Text Processing
+        </h2>
+       </div>
+      </div>
+     </div>
+     <div class="section" title="13.1.grep">
+      <div class="titlepage">
+       <div>
+        <div>
+         <h3 class="title">
+          <a name="id2629642">
+          </a>
+          13.1.grep
+         </h3>
+        </div>
+       </div>
+      </div>
+      <p id="ch9Using_Linux_Tools_19b">
+       <span class="emphasis">
+        <em>
+         grep
+        </em>
+       </span>
+       is a command line text search utility originally written for Unix. The name is taken from the first letters in
+       <span class="emphasis">
+        <em>
+         global / regular expression / print
+        </em>
+       </span>
+       , a series of instructions for the
+       <span class="emphasis">
+        <em>
+         ed
+        </em>
+       </span>
+       text editor. The
+       <span class="emphasis">
+        <em>
+         grep
+        </em>
+       </span>
+       command searches files or standard input globally for lines matching a given regular expression, and prints them to the program's standard output.
+      </p>
+      <div class="section" title="13.1.1.Usage">
+       <div class="titlepage">
+        <div>
+         <div>
+          <h4 class="title">
+           <a name="id2629673">
+           </a>
+           13.1.1.Usage
+          </h4>
+         </div>
+        </div>
+       </div>
+       <p id="ch9Using_Linux_Tools_19c">
+        This is an example of a common
+        <span class="emphasis">
+         <em>
+          grep
+         </em>
+        </span>
+        usage:
+       </p>
+       <pre class="programlisting">
+        $ grep apple fruitlist.txt
+       </pre>
+       <p id="ch9Using_Linux_Tools_19d">
+        In this case,
+        <span class="emphasis">
+         <em>
+          grep
+         </em>
+        </span>
+        prints all lines containing 'apple' from the file
+        <span class="emphasis">
+         <em>
+          fruitlist.txt
+         </em>
+        </span>
+        , regardless of word boundaries; therefore lines containing 'pineapple' or 'apples' are also printed. The
+        <span class="emphasis">
+         <em>
+          grep
+         </em>
+        </span>
+        command is case sensitive by default, so this example's output does not include lines containing 'Apple' (with a capital A) unless they also contain 'apple'.
+       </p>
+       <p id="ch9Using_Linux_Tools_19e">
+        Like most Unix commands,
+        <span class="emphasis">
+         <em>
+          grep
+         </em>
+        </span>
+        accepts command line arguments to change this and many other behaviors. For example:
+       </p>
+       <pre class="programlisting">
+        $ grep -i apple fruitlist.txt
+       </pre>
+       <p id="ch9Using_Linux_Tools_19f">
+        This prints all lines containing 'apple' regardless of capitalization. The '-i' argument tells
+        <span class="emphasis">
+         <em>
+          grep
+         </em>
+        </span>
+        to be case insensitive, or to ignore case.
+       </p>
+       <p id="ch9Using_Linux_Tools_1a0">
+        To print all lines containing 'apple' as a word ('pineapple' and 'apples' will not match):
+       </p>
+       <pre class="programlisting">
+        $ grep -w apple fruitlist.txt
+       </pre>
+       <p id="ch9Using_Linux_Tools_1a1">
+        Regular expressions can be used to match more complicated queries.
+       </p>
+       <div class="section" title="13.1.1.1.Variations">
+        <div class="titlepage">
+         <div>
+          <div>
+           <h5 class="title">
+            <a name="id2629751">
+            </a>
+            13.1.1.1.Variations
+           </h5>
+          </div>
+         </div>
+        </div>
+        <p id="ch9Using_Linux_Tools_1a2">
+         There are countless implementations and derivatives of
+         <span class="emphasis">
+          <em>
+           grep
+          </em>
+         </span>
+         available for many operating systems. Early variants of
+         <span class="emphasis">
+          <em>
+           grep
+          </em>
+         </span>
+         included
+         <span class="emphasis">
+          <em>
+           egrep
+          </em>
+         </span>
+         and
+         <span class="emphasis">
+          <em>
+           fgrep
+          </em>
+         </span>
+         . The former applies an extended regular expression syntax that was added to Unix after Ken Thompson's original regular expression implementation. The latter searches for any of a list of 'fixed' strings using the Aho-Corasick algorithm. These variants are embodied in most modern
+         <span class="emphasis">
+          <em>
+           grep
+          </em>
+         </span>
+         implementations as command-line switches (and standardized as -E and -F in POSIX). In such combined implementations,
+         <span class="emphasis">
+          <em>
+           grep
+          </em>
+         </span>
+         may also behave differently depending on the name by which it is invoked, allowing
+         <span class="emphasis">
+          <em>
+           fgrep
+          </em>
+         </span>
+         ,
+         <span class="emphasis">
+          <em>
+           egrep
+          </em>
+         </span>
+         , and
+         <span class="emphasis">
+          <em>
+           grep
+          </em>
+         </span>
+         to be links to the same program.
+        </p>
+        <p id="ch9Using_Linux_Tools_1a3">
+         <span class="emphasis">
+          <em>
+           pcregrep
+          </em>
+         </span>
+         is an implementation of
+         <span class="emphasis">
+          <em>
+           grep
+          </em>
+         </span>
+         that uses Perl regular expression syntax.
+        </p>
+        <p id="ch9Using_Linux_Tools_1a4">
+         Other commands contain the word 'grep' to indicate that they search (usually for regular expression matches). The
+         <span class="emphasis">
+          <em>
+           pgrep
+          </em>
+         </span>
+         utility, for instance, displays the processes whose names match a given regular expression.
+        </p>
+       </div>
+      </div>
+     </div>
+     <div class="section" title="13.2.tr">
+      <div class="titlepage">
+       <div>
+        <div>
+         <h3 class="title">
+          <a name="id2629831">
+          </a>
+          13.2.tr
+         </h3>
+        </div>
+       </div>
+      </div>
+      <p id="ch9Using_Linux_Tools_1a5">
+       <span class="emphasis">
+        <em>
+         tr
+        </em>
+       </span>
+       (abbreviated from
+       <span class="emphasis">
+        <em>
+         translate
+        </em>
+       </span>
+       or
+       <span class="emphasis">
+        <em>
+         transliterate
+        </em>
+       </span>
+       ) is a command in Unix-like operating systems.
+      </p>
+      <p id="ch9Using_Linux_Tools_1a6">
+       When executed, the program reads from the standard input and writes to the standard output. It takes as parameters two sets of characters, and replaces occurrences of the characters in the first set with the corresponding elements from the other set. For example,
+      </p>
+      <pre class="programlisting">
+       $ tr 'abcd' 'jkmn'
+      </pre>
+      <p id="ch9Using_Linux_Tools_1a7">
+       maps 'a' to 'j', 'b' to 'k', 'c' to 'm', and 'd' to 'n'.
+      </p>
+      <p id="ch9Using_Linux_Tools_1a8">
+       Sets of characters may be abbreviated by using character ranges. The previous example could be written:
+      </p>
+      <pre class="programlisting">
+       $ tr 'a-d' 'jkmn'
+      </pre>
+      <p id="ch9Using_Linux_Tools_1a9">
+       In POSIX compliant versions of
+       <span class="emphasis">
+        <em>
+         tr
+        </em>
+       </span>
+       the set represented by a character range depends on the locale's collating order, so it is safer to avoid character ranges in scripts that might be executed in a locale different from that in which they were written. Ranges can often be replaced with POSIX character sets such as [:alpha:].
+      </p>
+      <p id="ch9Using_Linux_Tools_1aa">
+       The
+       <span class="emphasis">
+        <em>
+         -c
+        </em>
+       </span>
+       flag complements the first set of characters.
+      </p>
+      <pre class="programlisting">
+       $ tr -cd '[:alnum:]'
+      </pre>
+      <p id="ch9Using_Linux_Tools_1ab">
+       therefore removes all non-alphanumeric characters.
+      </p>
+      <p id="ch9Using_Linux_Tools_1ac">
+       The
+       <span class="emphasis">
+        <em>
+         -s
+        </em>
+       </span>
+       flag causes tr to compress sequences of identical adjacent characters in its output to a single token. For example,
+      </p>
+      <pre class="programlisting">
+       $ tr -s ' n' ' n'
+      </pre>
+      <p id="ch9Using_Linux_Tools_1ad">
+       replaces sequences of one or more newline characters with a single newline.
+      </p>
+      <p id="ch9Using_Linux_Tools_1ae">
+       The
+       <span class="emphasis">
+        <em>
+         -d
+        </em>
+       </span>
+       flag causes tr to delete all tokens of the specified set of characters from its input. In this case, only a single character set argument is used. The following command removes carriage return characters, thereby converting a file in DOS/Windows format to one in Unix format.
+      </p>
+      <pre class="programlisting">
+       $ tr -d ' r'
+      </pre>
+      <p id="ch9Using_Linux_Tools_1af">
+       Most versions of
+       <span class="emphasis">
+        <em>
+         tr
+        </em>
+       </span>
+       , including GNU
+       <span class="emphasis">
+        <em>
+         tr
+        </em>
+       </span>
+       and classic Unix
+       <span class="emphasis">
+        <em>
+         tr
+        </em>
+       </span>
+       , operate on single byte characters and are not Unicode compliant. An exception is the Heirloom Toolchest implementation, which provides basic Unicode support.
+      </p>
+      <p id="ch9Using_Linux_Tools_1b0">
+       Ruby and Perl also have an internal
+       <span class="emphasis">
+        <em>
+         tr
+        </em>
+       </span>
+       operator, which operates analogously. Tcl's
+       <span class="emphasis">
+        <em>
+         string map
+        </em>
+       </span>
+       command is more general in that it maps strings to strings while
+       <span class="emphasis">
+        <em>
+         tr
+        </em>
+       </span>
+       maps characters to characters.
+      </p>
+     </div>
+    </div>
+    <div class="section" title="14.Elementary Regex">
+     <div class="titlepage">
+      <div>
+       <div>
+        <h2 class="title" style="clear: both">
+         <a name="id2629978">
+         </a>
+         14.Elementary Regex
+        </h2>
+       </div>
+      </div>
+     </div>
+     <p id="ch9Using_Linux_Tools_1b1">
+      In computing, regular expressions provide a concise and flexible means for identifying strings of text of interest, such as particular characters, words, or patterns of characters. A regular expression (often shortened to regex or regexp) is written in a formal language that can be interpreted by a regular expression processor, a program that either serves as a parser generator or examines text and identifies parts that match the provided specification.
+     </p>
+     <p id="ch9Using_Linux_Tools_1b2">
+      Regular expressions are used by many text editors, utilities, and programming languages to search and manipulate text based on patterns. For example, Perl, Ruby and Tcl have a powerful regular expression engine built directly into their syntax. Several utilities provided by Unix distributionsincluding the editor
+      <span class="emphasis">
+       <em>
+        ed
+       </em>
+      </span>
+      and the filter
+      <span class="emphasis">
+       <em>
+        grep
+       </em>
+      </span>
+      were the first to popularize the concept of regular expressions.
+     </p>
+     <p id="ch9Using_Linux_Tools_1b3">
+      Traditional Unix regular expression syntax followed common conventions but often differed from tool to tool. The IEEE POSIX
+      <span class="emphasis">
+       <em>
+        Basic Regular Expressions
+       </em>
+      </span>
+      (BRE) standard (released alongside an alternative flavor called Extended Regular Expressions or ERE) was designed mostly for backward compatibility with the traditional (Simple Regular Expression) syntax but provided a common standard which has since been adopted as the default syntax of many Unix regular expression tools, though there is often some variation or additional features. Many such tools also provide support for ERE syntax with command line arguments.
+     </p>
+     <p id="ch9Using_Linux_Tools_1b4">
+      In the BRE syntax, most characters are treated as literals  they match only themselves (i.e., a matches "a"). The exceptions, listed below, are called metacharacters or metasequences.
+     </p>
+     <p id="ch9Using_Linux_Tools_1b5">
+      Metacharacter
+     </p>
+     <p id="ch9Using_Linux_Tools_1b6">
+      Description
+     </p>
+     <p id="ch9Using_Linux_Tools_1b7">
+      .
+     </p>
+     <p id="ch9Using_Linux_Tools_1b8">
+      Matches any single character (many applications exclude
 newlines, and exactly which characters are considered
 newlines is flavor, character encoding, and platform
 specific, but it is safe to assume that the line feed
 character is included). Within POSIX bracket expressions,
 the dot character matches a literal dot. For example, a.c
 matches abc, etc., but [a.c] matches only a, ., or
-c.</p>
-<p><a name="ch9Using_Linux_Tools_1b9"></a>[ ]</p>
-<p><a name="ch9Using_Linux_Tools_1ba"></a>A bracket expression. Matches a single character that is
+c.
+     </p>
+     <p id="ch9Using_Linux_Tools_1b9">
+      [ ]
+     </p>
+     <p id="ch9Using_Linux_Tools_1ba">
+      A bracket expression. Matches a single character that is
 contained within the brackets. For example, [abc] matches
 a, b, or c. [a-z] specifies a range which matches any
 lowercase letter from a to z. These forms can be mixed:
@@ -1339,94 +5505,237 @@
 [a-cx-z]. The - character is treated as a literal character
 if it is the last or the first character within the
 brackets, or if it is escaped with a backslash: [abc-],
-[-abc], or [a-bc].</p>
-<p><a name="ch9Using_Linux_Tools_1bb"></a>[^ ]</p>
-<p><a name="ch9Using_Linux_Tools_1bc"></a>Matches a single character that is not contained within the
+[-abc], or [a-bc].
+     </p>
+     <p id="ch9Using_Linux_Tools_1bb">
+      [^ ]
+     </p>
+     <p id="ch9Using_Linux_Tools_1bc">
+      Matches a single character that is not contained within the
 brackets. For example, [^abc] matches any character other
 than a, b, or c. [^a-z] matches any single character
 that is not a lowercase letter from a to z. As above,
-literal characters and ranges can be mixed.</p>
-<p><a name="ch9Using_Linux_Tools_1bd"></a>^</p>
-<p><a name="ch9Using_Linux_Tools_1be"></a>Matches the starting position within the string. In
+literal characters and ranges can be mixed.
+     </p>
+     <p id="ch9Using_Linux_Tools_1bd">
+      ^
+     </p>
+     <p id="ch9Using_Linux_Tools_1be">
+      Matches the starting position within the string. In
 line-based tools, it matches the starting position of any
-line.</p>
-<p><a name="ch9Using_Linux_Tools_1bf"></a>$</p>
-<p><a name="ch9Using_Linux_Tools_1c0"></a>Matches the ending position of the string or the position
+line.
+     </p>
+     <p id="ch9Using_Linux_Tools_1bf">
+      $
+     </p>
+     <p id="ch9Using_Linux_Tools_1c0">
+      Matches the ending position of the string or the position
 just before a string-ending newline. In line-based tools,
-it matches the ending position of any line.</p>
-<p><a name="ch9Using_Linux_Tools_1c1"></a>*</p>
-<p><a name="ch9Using_Linux_Tools_1c2"></a>Matches the preceding element zero or more times. For
+it matches the ending position of any line.
+     </p>
+     <p id="ch9Using_Linux_Tools_1c1">
+      *
+     </p>
+     <p id="ch9Using_Linux_Tools_1c2">
+      Matches the preceding element zero or more times. For
 example, ab*c matches "ac", "abc", "abbbc", etc. [xyz]*
 matches "", "x", "y", "z", "zx", "zyx", "xyzzy", and so on.
-(ab)* matches "", "ab", "abab", "ababab", and so on.</p>
-<p><a name="ch9Using_Linux_Tools_1c3"></a>?</p>
-<p><a name="ch9Using_Linux_Tools_1c4"></a>Matches the preceding element zero or one time. For
-example, ba? matches "b" or "ba".</p>
-<p><a name="ch9Using_Linux_Tools_1c5"></a>+</p>
-<p><a name="ch9Using_Linux_Tools_1c6"></a>Matches the preceding element one or more times. For
-example, ba+ matches "ba", "baa", "baaa", and so on.</p>
-<p><a name="ch9Using_Linux_Tools_1c7"></a>|</p>
-<p><a name="ch9Using_Linux_Tools_1c8"></a>The choice (aka alternation or set union) operator matches
+(ab)* matches "", "ab", "abab", "ababab", and so on.
+     </p>
+     <p id="ch9Using_Linux_Tools_1c3">
+      ?
+     </p>
+     <p id="ch9Using_Linux_Tools_1c4">
+      Matches the preceding element zero or one time. For
+example, ba? matches "b" or "ba".
+     </p>
+     <p id="ch9Using_Linux_Tools_1c5">
+      +
+     </p>
+     <p id="ch9Using_Linux_Tools_1c6">
+      Matches the preceding element one or more times. For
+example, ba+ matches "ba", "baa", "baaa", and so on.
+     </p>
+     <p id="ch9Using_Linux_Tools_1c7">
+      |
+     </p>
+     <p id="ch9Using_Linux_Tools_1c8">
+      The choice (aka alternation or set union) operator matches
 either the expression before or the expression after the
-operator. For example, abc|def matches "abc" or "def".</p>
-<div class="section" title="14.1. Lazy quantification">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="id2951511"></a>14.1. Lazy quantification</h3></div></div></div>
-<p><a name="ch9Using_Linux_Tools_1c9"></a>The standard quantifiers in regular expressions are greedy, meaning they match as much as they can, only giving back as necessary to match the remainder of the regex. For example, someone new to regexes wishing to find the first instance of an item between &lt; and &gt; symbols in this example:</p>
-<pre class="programlisting">
-Another whale explosion occurred on &lt;January 26&gt;, &lt;2004&gt;.</pre>
-<p><a name="ch9Using_Linux_Tools_1ca"></a>...would likely come up with the pattern &lt;.*&gt;, or similar. However, this pattern will actually return "&lt;January 26&gt;, &lt;2004&gt;" instead of the "&lt;January 26&gt;" which might be expected, because the * quantifier is greedy — it will consume as many characters as possible from the input, and "January 26&gt;, &lt;2004" has more characters than "January 26".</p>
-<p><a name="ch9Using_Linux_Tools_1cb"></a>Though this problem can be avoided in a number of ways (e.g., by specifying the text that is not to be matched: &lt;[^&gt;]*&gt;), modern regular expression tools allow a quantifier to be specified as <span class="emphasis"><em>lazy</em></span> (also known as non-greedy, reluctant, minimal, or ungreedy) by putting a question mark after the quantifier (e.g., &lt;.*?&gt;), or by using a modifier which reverses the greediness of quantifiers (though changing the meaning of the standard quantifiers can be confusing). By using a lazy quantifier, the expression tries the minimal match first. Though in the previous example lazy matching is used to select one of many matching results, in some cases it can also be used to improve performance when greedy matching would require more backtracking.</p>
-</div>
-</div>
-<div class="section" title="15. One Liners">
-<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="id2951586"></a>15. One Liners</h2></div></div></div>
-<p><a name="ch9Using_Linux_Tools_1cc"></a>A <span class="emphasis"><em>one-liner</em></span> is textual input to the command-line of an operating system shell that performs some function in just one line of input.</p>
-<p><a name="ch9Using_Linux_Tools_1cd"></a>The one liner can be</p>
-<div class="orderedlist"><ol class="orderedlist" type="1">
-<li class="listitem"><p><a name="ch9Using_Linux_Tools_1ce"></a>An expression written in the language of the shell.</p></li>
-<li class="listitem"><p><a name="ch9Using_Linux_Tools_1cf"></a>The invocation of an interpreter together with program source for the interpreter to run.</p></li>
-<li class="listitem"><p><a name="ch9Using_Linux_Tools_1d0"></a>The invocation of a compiler together with source to compile and
-instructions for executing the compiled program.</p></li>
-</ol></div>
-<p><a name="ch9Using_Linux_Tools_1d1"></a>Certain dynamic scripting languages such as AWK, sed, and perl have traditionally been adept at expressing one-liners. Specialist shell interpreters such as these Unix shells or the Windows PowerShell, allow for the construction of powerful one-liners.</p>
-<p><a name="ch9Using_Linux_Tools_1d2"></a>The use of the phrase one-liner has been widened to also include program-source for any language that does something useful in one line.</p>
-<p><a name="ch9Using_Linux_Tools_1d3"></a>The word <span class="emphasis"><em>One-liner</em></span> has two references in the index of the book <span class="emphasis"><em>The AWK Programming Language</em></span> (the book is often referred to by the abbreviation TAPL). It explains the programming language AWK, which is part of the Unix operating system. The authors explain the birth of the One-liner paradigm with their daily work on early Unix machines:</p>
-<pre class="programlisting">
-“The 1977 version had only a few built-in variables and predefined functions. It was designed for writing short programs [...] Our model was that an invocation would be one or two lines long, typed in and used immediately. Defaults were chosen to match this style [...] We, being the authors, knew how the language was supposed to be used, and so we only wrote one-liners.”</pre>
-<p><a name="ch9Using_Linux_Tools_1d4"></a>Notice that this original definition of a One-liner implies immediate execution of the program without any compilation. So, in a strict sense, only source code for interpreted languages qualifies as a One-liner. But this strict understanding of a One-liner was broadened in 1985 when the IOCCC introduced the category of Best One Liner for C, which is a compiled language.</p>
-<p><a name="ch9Using_Linux_Tools_1d5"></a>The TAPL book contains 20 examples of One-liners (A Handful of Useful awk One-Liners) at the end of the book's first chapter.</p>
-<p><a name="ch9Using_Linux_Tools_1d6"></a>Here are the first few of them:</p>
-<div class="orderedlist"><ol class="orderedlist" type="1">
-<li class="listitem">
-<p><a name="ch9Using_Linux_Tools_1d7"></a>Print the total number of input lines:</p>
-<p><a name="ch9Using_Linux_Tools_1d8"></a>END { print NR }</p>
-</li>
-<li class="listitem">
-<p><a name="ch9Using_Linux_Tools_1d9"></a>Print the tenth input line:</p>
-<p><a name="ch9Using_Linux_Tools_1da"></a>NR == 10</p>
-</li>
-<li class="listitem">
-<p><a name="ch9Using_Linux_Tools_1db"></a>Print the last field of every input line:</p>
-<p><a name="ch9Using_Linux_Tools_1dc"></a>{ print $NF }</p>
-</li>
-</ol></div>
-<p><a name="ch9Using_Linux_Tools_1dd"></a>One-liners are also used to show off the differential expressive power of programming languages. Frequently, one-liners are used to demonstrate programming ability. Contests are often held to see who can create the most exceptional one-liner.</p>
-<p><a name="ch9Using_Linux_Tools_1de"></a>The following example is a C program (a winning entry in the "Best one-liner" category of the IOCCC, here split to two lines for presentation).:</p>
-<pre class="programlisting">
-main(int c,char**v){return!m(v[1],v[2]);}m(char*s,char*t){return
-*t-42?*s?63==*t|*s==*t&amp;&amp;m(s+1,t+1):!*t:m(s,t+1)||*s&amp;&amp;m(s+1,t);}</pre>
-<p><a name="ch9Using_Linux_Tools_1df"></a>This one-liner program is a <span class="emphasis"><em>glob pattern matcher</em></span>. It understands the glob characters '*' meaning 'zero or more characters' and '?' meaning exactly one character, just like most Unix shells.</p>
-<p><a name="ch9Using_Linux_Tools_1e0"></a>Run it with two args, the string and the glob pattern. The exit status is 0 (shell true) when the pattern matches, 1 otherwise. The glob pattern must match the whole string, so you may want to use * at the beginning and end of the pattern if you are looking for something in the middle. Examples:</p>
-<pre class="programlisting">
-$ prog foo 'f??'; echo $?
+operator. For example, abc|def matches "abc" or "def".
+     </p>
+     <div class="section" title="14.1.Lazy quantification">
+      <div class="titlepage">
+       <div>
+        <div>
+         <h3 class="title">
+          <a name="id2630180">
+          </a>
+          14.1.Lazy quantification
+         </h3>
+        </div>
+       </div>
+      </div>
+      <p id="ch9Using_Linux_Tools_1c9">
+       The standard quantifiers in regular expressions are greedy, meaning they match as much as they can, only giving back as necessary to match the remainder of the regex. For example, someone new to regexes wishing to find the first instance of an item between &lt; and &gt; symbols in this example:
+      </p>
+      <pre class="programlisting">
+       Another whale explosion occurred on &lt;January 26&gt;, &lt;2004&gt;.
+      </pre>
+      <p id="ch9Using_Linux_Tools_1ca">
+       ...would likely come up with the pattern &lt;.*&gt;, or similar. However, this pattern will actually return "&lt;January 26&gt;, &lt;2004&gt;" instead of the "&lt;January 26&gt;" which might be expected, because the * quantifier is greedy  it will consume as many characters as possible from the input, and "January 26&gt;, &lt;2004" has more characters than "January 26".
+      </p>
+      <p id="ch9Using_Linux_Tools_1cb">
+       Though this problem can be avoided in a number of ways (e.g., by specifying the text that is not to be matched: &lt;[^&gt;]*&gt;), modern regular expression tools allow a quantifier to be specified as
+       <span class="emphasis">
+        <em>
+         lazy
+        </em>
+       </span>
+       (also known as non-greedy, reluctant, minimal, or ungreedy) by putting a question mark after the quantifier (e.g., &lt;.*?&gt;), or by using a modifier which reverses the greediness of quantifiers (though changing the meaning of the standard quantifiers can be confusing). By using a lazy quantifier, the expression tries the minimal match first. Though in the previous example lazy matching is used to select one of many matching results, in some cases it can also be used to improve performance when greedy matching would require more backtracking.
+      </p>
+     </div>
+    </div>
+    <div class="section" title="15.One Liners">
+     <div class="titlepage">
+      <div>
+       <div>
+        <h2 class="title" style="clear: both">
+         <a name="id2630255">
+         </a>
+         15.One Liners
+        </h2>
+       </div>
+      </div>
+     </div>
+     <p id="ch9Using_Linux_Tools_1cc">
+      A
+      <span class="emphasis">
+       <em>
+        one-liner
+       </em>
+      </span>
+      is textual input to the command-line of an operating system shell that performs some function in just one line of input.
+     </p>
+     <p id="ch9Using_Linux_Tools_1cd">
+      The one liner can be
+     </p>
+     <div class="orderedlist">
+      <ol class="orderedlist" type="1">
+       <li class="listitem">
+        <p id="ch9Using_Linux_Tools_1ce">
+         An expression written in the language of the shell.
+        </p>
+       </li>
+       <li class="listitem">
+        <p id="ch9Using_Linux_Tools_1cf">
+         The invocation of an interpreter together with program source for the interpreter to run.
+        </p>
+       </li>
+       <li class="listitem">
+        <p id="ch9Using_Linux_Tools_1d0">
+         The invocation of a compiler together with source to compile and
+instructions for executing the compiled program.
+        </p>
+       </li>
+      </ol>
+     </div>
+     <p id="ch9Using_Linux_Tools_1d1">
+      Certain dynamic scripting languages such as AWK, sed, and perl have traditionally been adept at expressing one-liners. Specialist shell interpreters such as these Unix shells or the Windows PowerShell, allow for the construction of powerful one-liners.
+     </p>
+     <p id="ch9Using_Linux_Tools_1d2">
+      The use of the phrase one-liner has been widened to also include program-source for any language that does something useful in one line.
+     </p>
+     <p id="ch9Using_Linux_Tools_1d3">
+      The word
+      <span class="emphasis">
+       <em>
+        One-liner
+       </em>
+      </span>
+      has two references in the index of the book
+      <span class="emphasis">
+       <em>
+        The AWK Programming Language
+       </em>
+      </span>
+      (the book is often referred to by the abbreviation TAPL). It explains the programming language AWK, which is part of the Unix operating system. The authors explain the birth of the One-liner paradigm with their daily work on early Unix machines:
+     </p>
+     <pre class="programlisting">
+      The 1977 version had only a few built-in variables and predefined functions. It was designed for writing short programs [...] Our model was that an invocation would be one or two lines long, typed in and used immediately. Defaults were chosen to match this style [...] We, being the authors, knew how the language was supposed to be used, and so we only wrote one-liners.
+     </pre>
+     <p id="ch9Using_Linux_Tools_1d4">
+      Notice that this original definition of a One-liner implies immediate execution of the program without any compilation. So, in a strict sense, only source code for interpreted languages qualifies as a One-liner. But this strict understanding of a One-liner was broadened in 1985 when the IOCCC introduced the category of Best One Liner for C, which is a compiled language.
+     </p>
+     <p id="ch9Using_Linux_Tools_1d5">
+      The TAPL book contains 20 examples of One-liners (A Handful of Useful awk One-Liners) at the end of the book's first chapter.
+     </p>
+     <p id="ch9Using_Linux_Tools_1d6">
+      Here are the first few of them:
+     </p>
+     <div class="orderedlist">
+      <ol class="orderedlist" type="1">
+       <li class="listitem">
+        <p id="ch9Using_Linux_Tools_1d7">
+         Print the total number of input lines:
+        </p>
+        <p id="ch9Using_Linux_Tools_1d8">
+         END { print NR }
+        </p>
+       </li>
+       <li class="listitem">
+        <p id="ch9Using_Linux_Tools_1d9">
+         Print the tenth input line:
+        </p>
+        <p id="ch9Using_Linux_Tools_1da">
+         NR == 10
+        </p>
+       </li>
+       <li class="listitem">
+        <p id="ch9Using_Linux_Tools_1db">
+         Print the last field of every input line:
+        </p>
+        <p id="ch9Using_Linux_Tools_1dc">
+         { print $NF }
+        </p>
+       </li>
+      </ol>
+     </div>
+     <p id="ch9Using_Linux_Tools_1dd">
+      One-liners are also used to show off the differential expressive power of programming languages. Frequently, one-liners are used to demonstrate programming ability. Contests are often held to see who can create the most exceptional one-liner.
+     </p>
+     <p id="ch9Using_Linux_Tools_1de">
+      The following example is a C program (a winning entry in the "Best one-liner" category of the IOCCC, here split to two lines for presentation).:
+     </p>
+     <pre class="programlisting">
+      main(int c,char**v){return!m(v[1],v[2]);}m(char*s,char*t){return
+*t-42?*s?63==*t|*s==*t&amp;&amp;m(s+1,t+1):!*t:m(s,t+1)||*s&amp;&amp;m(s+1,t);}
+     </pre>
+     <p id="ch9Using_Linux_Tools_1df">
+      This one-liner program is a
+      <span class="emphasis">
+       <em>
+        glob pattern matcher
+       </em>
+      </span>
+      . It understands the glob characters '*' meaning 'zero or more characters' and '?' meaning exactly one character, just like most Unix shells.
+     </p>
+     <p id="ch9Using_Linux_Tools_1e0">
+      Run it with two args, the string and the glob pattern. The exit status is 0 (shell true) when the pattern matches, 1 otherwise. The glob pattern must match the whole string, so you may want to use * at the beginning and end of the pattern if you are looking for something in the middle. Examples:
+     </p>
+     <pre class="programlisting">
+      $ prog foo 'f??'; echo $?
 
-$ prog 'best short program' '??st*o**p?*'; echo $?</pre>
-<p><a name="ch9Using_Linux_Tools_1e1"></a>Here is a one line shell script to show directories:</p>
-<pre class="programlisting">
-$ ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^ /]* //--/g' -e 's/^/   /' -e 's/-/|/'</pre>
-</div>
-</div>
-</div></body>
+$ prog 'best short program' '??st*o**p?*'; echo $?
+     </pre>
+     <p id="ch9Using_Linux_Tools_1e1">
+      Here is a one line shell script to show directories:
+     </p>
+     <pre class="programlisting">
+      $ ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^ /]* //--/g' -e 's/^/   /' -e 's/-/|/'
+     </pre>
+    </div>
+   </div>
+  </div>
+ </body>
 </html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SEESenv/web/html/chn10session4.html	Thu Feb 25 00:04:27 2010 +0530
@@ -0,0 +1,1596 @@
+<html>
+ <head>
+  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+  <title>
+   Chapter. session
+  </title>
+  <link rel="stylesheet" href="/review/support/styles.css" type="text/css" />
+  <meta name="generator" content="DocBook XSL Stylesheets V1.74.3" />
+  <link rel="shortcut icon" type="image/png" href="/review/support/figs/favicon.png" />
+  <script type="text/javascript" src="/review/support/jquery-min.js">
+  </script>
+  <script type="text/javascript" src="/review/support/form.js">
+  </script>
+  <script type="text/javascript" src="/review/support/hsbook.js">
+  </script>
+ </head>
+ <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+  <div class="chapter" id="chn10session4">
+   <div class="titlepage">
+   </div>
+   <div class="toc">
+    <p>
+     <b>
+      Table of Contents
+     </b>
+    </p>
+    <dl>
+     <dt>
+      <span class="article">
+       <a href="#id2501738">
+       </a>
+      </span>
+     </dt>
+     <dd>
+      <dl>
+       <dt>
+        <span class="section">
+         <a href="#id2311829">
+          1. More text processing
+         </a>
+        </span>
+       </dt>
+       <dd>
+        <dl>
+         <dt>
+          <span class="section">
+           <a href="#id2499853">
+            1.1.
+            <code class="literal">
+             sort
+            </code>
+           </a>
+          </span>
+         </dt>
+         <dt>
+          <span class="section">
+           <a href="#id2552760">
+            1.2.
+            <code class="literal">
+             uniq
+            </code>
+           </a>
+          </span>
+         </dt>
+         <dt>
+          <span class="section">
+           <a href="#id2552862">
+            1.3.
+            <code class="literal">
+             join
+            </code>
+           </a>
+          </span>
+         </dt>
+        </dl>
+       </dd>
+       <dt>
+        <span class="section">
+         <a href="#id2552962">
+          2. Generating a word frequency list
+         </a>
+        </span>
+       </dt>
+       <dt>
+        <span class="section">
+         <a href="#id2553109">
+          3. Basic editing and editors
+         </a>
+        </span>
+       </dt>
+       <dd>
+        <dl>
+         <dt>
+          <span class="section">
+           <a href="#id2553118">
+            3.1. vim
+           </a>
+          </span>
+         </dt>
+         <dt>
+          <span class="section">
+           <a href="#id2553684">
+            3.2. SciTE
+           </a>
+          </span>
+         </dt>
+        </dl>
+       </dd>
+       <dt>
+        <span class="section">
+         <a href="#id2553729">
+          4. Personalizing your Environment
+         </a>
+        </span>
+       </dt>
+       <dd>
+        <dl>
+         <dt>
+          <span class="section">
+           <a href="#id2553738">
+            4.1. .bashrc
+           </a>
+          </span>
+         </dt>
+         <dt>
+          <span class="section">
+           <a href="#id2554039">
+            4.2. .vimrc
+           </a>
+          </span>
+         </dt>
+        </dl>
+       </dd>
+       <dt>
+        <span class="section">
+         <a href="#id2554257">
+          5. Subshells and
+          <code class="literal">
+           source
+          </code>
+         </a>
+        </span>
+       </dt>
+      </dl>
+     </dd>
+    </dl>
+   </div>
+   <div class="article">
+    <div class="titlepage">
+     <div>
+      <div>
+       <h2 class="title" id="id2501738">
+       </h2>
+      </div>
+      <div>
+       <h2 class="title" id="id2501738">
+       </h2>
+      </div>
+     </div>
+     <hr />
+    </div>
+    <div class="toc">
+     <p>
+      <b>
+       Table of Contents
+      </b>
+     </p>
+     <dl>
+      <dt>
+       <span class="section">
+        <a href="#id2311829">
+         1. More text processing
+        </a>
+       </span>
+      </dt>
+      <dd>
+       <dl>
+        <dt>
+         <span class="section">
+          <a href="#id2499853">
+           1.1.
+           <code class="literal">
+            sort
+           </code>
+          </a>
+         </span>
+        </dt>
+        <dt>
+         <span class="section">
+          <a href="#id2552760">
+           1.2.
+           <code class="literal">
+            uniq
+           </code>
+          </a>
+         </span>
+        </dt>
+        <dt>
+         <span class="section">
+          <a href="#id2552862">
+           1.3.
+           <code class="literal">
+            join
+           </code>
+          </a>
+         </span>
+        </dt>
+       </dl>
+      </dd>
+      <dt>
+       <span class="section">
+        <a href="#id2552962">
+         2. Generating a word frequency list
+        </a>
+       </span>
+      </dt>
+      <dt>
+       <span class="section">
+        <a href="#id2553109">
+         3. Basic editing and editors
+        </a>
+       </span>
+      </dt>
+      <dd>
+       <dl>
+        <dt>
+         <span class="section">
+          <a href="#id2553118">
+           3.1. vim
+          </a>
+         </span>
+        </dt>
+        <dt>
+         <span class="section">
+          <a href="#id2553684">
+           3.2. SciTE
+          </a>
+         </span>
+        </dt>
+       </dl>
+      </dd>
+      <dt>
+       <span class="section">
+        <a href="#id2553729">
+         4. Personalizing your Environment
+        </a>
+       </span>
+      </dt>
+      <dd>
+       <dl>
+        <dt>
+         <span class="section">
+          <a href="#id2553738">
+           4.1. .bashrc
+          </a>
+         </span>
+        </dt>
+        <dt>
+         <span class="section">
+          <a href="#id2554039">
+           4.2. .vimrc
+          </a>
+         </span>
+        </dt>
+       </dl>
+      </dd>
+      <dt>
+       <span class="section">
+        <a href="#id2554257">
+         5. Subshells and
+         <code class="literal">
+          source
+         </code>
+        </a>
+       </span>
+      </dt>
+     </dl>
+    </div>
+    <div class="section" title="1.More text processing">
+     <div class="titlepage">
+      <div>
+       <div>
+        <h2 class="title" style="clear: both">
+         <a name="id2311829">
+         </a>
+         1.More text processing
+        </h2>
+       </div>
+      </div>
+     </div>
+     <div class="section" title="1.1.sort">
+      <div class="titlepage">
+       <div>
+        <div>
+         <h3 class="title">
+          <a name="id2499853">
+          </a>
+          1.1.
+          <code class="literal">
+           sort
+          </code>
+         </h3>
+        </div>
+       </div>
+      </div>
+      <p id="ch10session4_1">
+       Let's say we have a file which lists a few of the stalwarts of the open source community and a few details about them, like their "other" name, their homepage address, and what they are well known for or their claim to fame.
+      </p>
+      <pre class="programlisting">
+       Richard Stallman%rms%GNU Project
+Eric Raymond%ESR%Jargon File
+Ian Murdock% %Debian
+Lawrence Lessig% %Creative Commons
+Linus Torvalds% %Linux Kernel
+Guido van Rossum%BDFL%Python
+Larry Wall% %Perl
+      </pre>
+      <p id="ch10session4_2">
+       The sort command enables us to do this in a flash! Just running the sort command with the file name as a parameter sorts the lines of the file alphabetically and prints the output on the terminal.
+      </p>
+      <pre class="programlisting">
+       $ sort stalwarts.txt
+Eric Raymond%ESR%Jargon File
+Guido van Rossum%BDFL%Python
+Ian Murdock% %Debian
+Larry Wall% %Perl
+Lawrence Lessig% %Creative Commons
+Linus Torvalds% %Linux Kernel
+Richard Stallman%rms%GNU Project
+      </pre>
+      <p id="ch10session4_3">
+       If you wish to sort them reverse alphabetically, you just need to pass the
+       <code class="literal">
+        -r
+       </code>
+       option. Now, you might want to sort the lines, based on each person's claim to fame or their "other" name. What do we do in that case?
+      </p>
+      <p id="ch10session4_4">
+       Below is an example that sorts the file based on "other" names.
+      </p>
+      <pre class="programlisting">
+       $ sort -t % -k 2,2  stalwarts.txt
+
+Ian Murdock% %Debian
+Larry Wall% %Perl
+Lawrence Lessig% %Creative Commons
+Linus Torvalds% %Linux Kernel
+Guido van Rossum%BDFL%Python
+Eric Raymond%ESR%Jargon File
+Richard Stallman%rms%GNU Project
+      </pre>
+      <p id="ch10session4_5">
+       Sort command assumes white space to be the default delimiter for columns in each line. The
+       <code class="literal">
+        -t
+       </code>
+       option specifies the delimiting character, which is
+       <code class="literal">
+        %
+       </code>
+       in this case.
+      </p>
+      <p id="ch10session4_6">
+       The
+       <code class="literal">
+        -k
+       </code>
+       option starts a key at position 2 and ends it at 2, essentially telling the sort command that it should sort based on the 2nd column, which is the other name.
+       <code class="literal">
+        sort
+       </code>
+       also supports conflict resolution using multiple columns for sorting. You can see that the first three lines have nothing in the "other" names column. We could resolve the conflict by sorting based on the project names (the 3rd column).
+      </p>
+      <pre class="programlisting">
+       $ sort -t % -k 2,2 -k 3,3  stalwarts.txt
+
+Lawrence Lessig% %Creative Commons
+Ian Murdock% %Debian
+Linus Torvalds% %Linux Kernel
+Larry Wall% %Perl
+Guido van Rossum%BDFL%Python
+Eric Raymond%ESR%Jargon File
+Richard Stallman%rms%GNU Project
+      </pre>
+      <p id="ch10session4_7">
+       <code class="literal">
+        sort
+       </code>
+       also has a lot of other options like ignoring case differences, month sort(JAN&lt;FEB&lt;...), merging already sorted files.
+       <code class="literal">
+        man sort
+       </code>
+       would give you a lot of information.
+      </p>
+     </div>
+     <div class="section" title="1.2.uniq">
+      <div class="titlepage">
+       <div>
+        <div>
+         <h3 class="title">
+          <a name="id2552760">
+          </a>
+          1.2.
+          <code class="literal">
+           uniq
+          </code>
+         </h3>
+        </div>
+       </div>
+      </div>
+      <p id="ch10session4_8">
+       Suppose we have a list of items, say books, and we wish to obtain a list which names of all the books only once, without any duplicates. We use the
+       <code class="literal">
+        uniq
+       </code>
+       command to achieve this.
+      </p>
+      <pre class="programlisting">
+       Programming Pearls
+The C Programming Language
+The Mythical Man Month: Essays on Software Engineering
+Programming Pearls
+The C Programming Language
+Structure and Interpretation of Computer Programs
+Programming Pearls
+Compilers: Principles, Techniques, and Tools
+The C Programming Language
+The Art of UNIX Programming
+Programming Pearls
+The Art of Computer Programming
+Introduction to Algorithms
+The Art of UNIX Programming
+The Pragmatic Programmer: From Journeyman to Master
+Programming Pearls
+Unix Power Tools
+The Art of UNIX Programming
+      </pre>
+      <p id="ch10session4_9">
+       Let us try and get rid of the duplicate lines from this file using the
+       <code class="literal">
+        uniq
+       </code>
+       command.
+      </p>
+      <pre class="programlisting">
+       $ uniq items.txt
+Programming Pearls
+The C Programming Language
+The Mythical Man Month: Essays on Software Engineering
+Programming Pearls
+The C Programming Language
+Structure and Interpretation of Computer Programs
+Programming Pearls
+Compilers: Principles, Techniques, and Tools
+The C Programming Language
+The Art of UNIX Programming
+Programming Pearls
+The Art of Computer Programming
+Introduction to Algorithms
+The Art of UNIX Programming
+The Pragmatic Programmer: From Journeyman to Master
+Programming Pearls
+Unix Power Tools
+The Art of UNIX Programming
+      </pre>
+      <p id="ch10session4_a">
+       Nothing happens! Why? The
+       <code class="literal">
+        uniq
+       </code>
+       command removes duplicate lines only when they are next to each other. So, we get a sorted file from the original file and work with that file, henceforth.
+      </p>
+      <pre class="programlisting">
+       $ sort items.txt &gt; items-sorted.txt
+$ uniq items-sorted.txt
+Compilers: Principles, Techniques, and Tools
+Introduction to Algorithms
+Programming Pearls
+Structure and Interpretation of Computer Programs
+The Art of Computer Programming
+The Art of UNIX Programming
+The C Programming Language
+The Mythical Man Month: Essays on Software Engineering
+The Pragmatic Programmer: From Journeyman to Master
+Unix Power Tools
+      </pre>
+      <p id="ch10session4_b">
+       <code class="literal">
+        uniq -u
+       </code>
+       command gives the lines which are unique and do not have any duplicates in the file.
+       <code class="literal">
+        uniq -d
+       </code>
+       outputs only those lines which have duplicates. The
+       <code class="literal">
+        -c
+       </code>
+       option displays the number of times each line occurs in the file.
+      </p>
+      <pre class="programlisting">
+       $ uniq -u items-sorted.txt
+Compilers: Principles, Techniques, and Tools
+Introduction to Algorithms
+Structure and Interpretation of Computer Programs
+The Art of Computer Programming
+The Mythical Man Month: Essays on Software Engineering
+The Pragmatic Programmer: From Journeyman to Master
+Unix Power Tools
+
+$ uniq -dc items-sorted.txt
+5 Programming Pearls
+3 The Art of UNIX Programming
+3 The C Programming Language
+      </pre>
+     </div>
+     <div class="section" title="1.3.join">
+      <div class="titlepage">
+       <div>
+        <div>
+         <h3 class="title">
+          <a name="id2552862">
+          </a>
+          1.3.
+          <code class="literal">
+           join
+          </code>
+         </h3>
+        </div>
+       </div>
+      </div>
+      <p id="ch10session4_c">
+       Now suppose we had the file
+       <code class="literal">
+        stalwarts1.txt
+       </code>
+       , which lists the home pages of all the people listed in
+       <code class="literal">
+        stalwarts.txt
+       </code>
+       .
+      </p>
+      <pre class="programlisting">
+       Richard Stallman%http://www.stallman.org
+Eric Raymond%http://www.catb.org/~esr/
+Ian Murdock%http://ianmurdock.com/
+Lawrence Lessig%http://lessig.org
+Linus Torvalds%http://torvalds-family.blogspot.com/
+Guido van Rossum%http://www.python.org/~guido/
+Larry Wall%http://www.wall.org/~larry/
+      </pre>
+      <p id="ch10session4_d">
+       It would be nice to have a single file with the information in both the files. To achieve this we use the
+       <code class="literal">
+        join
+       </code>
+       command.
+      </p>
+      <pre class="programlisting">
+       $ join stalwarts.txt stalwarts1.txt -t %
+Richard Stallman%rms%GNU Project%http://www.stallman.org
+Eric Raymond%ESR%Jargon File%http://www.catb.org/~esr/
+Ian Murdock% %Debian%http://ianmurdock.com/
+Lawrence Lessig% %Creative Commons%http://lessig.org
+Linus Torvalds% %Linux Kernel%http://torvalds-family.blogspot.com/
+Guido van Rossum%BDFL%Python%http://www.python.org/~guido/
+Larry Wall% %Perl%http://www.wall.org/~larry/
+      </pre>
+      <p id="ch10session4_e">
+       The
+       <code class="literal">
+        join
+       </code>
+       command joins the two files, based on the common field present in both the files, which is the name, in this case.
+      </p>
+      <p id="ch10session4_f">
+       The
+       <code class="literal">
+        -t
+       </code>
+       option again specifies the delimiting character. Unless that is specified, join assumes that the fields are separated by spaces.
+      </p>
+      <p id="ch10session4_10">
+       Note that, for
+       <code class="literal">
+        join
+       </code>
+       to work, the common field should be in the same order in both the files. If this is not so, you could use
+       <code class="literal">
+        sort
+       </code>
+       , to sort the files on the common field and then join the files. In the above example, we have the common field to be the first column in both the files. If this is not the case we could use the
+       <code class="literal">
+        -1
+       </code>
+       and
+       <code class="literal">
+        -2
+       </code>
+       options to specify the field to be used for joining the files.
+      </p>
+      <pre class="programlisting">
+       $ join -2 2 stalwarts.txt stalwarts2.txt -t %
+Richard Stallman%rms%GNU Project%http://www.stallman.org
+Eric Raymond%ESR%Jargon File%http://www.catb.org/~esr/
+Ian Murdock% %Debian%http://ianmurdock.com/
+Lawrence Lessig% %Creative Commons%http://lessig.org
+Linus Torvalds% %Linux Kernel%http://torvalds-family.blogspot.com/
+Guido van Rossum%BDFL%Python%http://www.python.org/~guido/
+Larry Wall% %Perl%http://www.wall.org/~larry/
+      </pre>
+     </div>
+    </div>
+    <div class="section" title="2.Generating a word frequency list">
+     <div class="titlepage">
+      <div>
+       <div>
+        <h2 class="title" style="clear: both">
+         <a name="id2552962">
+         </a>
+         2.Generating a word frequency list
+        </h2>
+       </div>
+      </div>
+     </div>
+     <p id="ch10session4_11">
+      Now, let us use the tools we have learnt to use, to generate a word frequency list of a text file. We shall use the free text of Alice in Wonderland.
+     </p>
+     <p id="ch10session4_12">
+      The basic steps to achieve this task would be -
+     </p>
+     <div class="orderedlist">
+      <ol class="orderedlist" type="1">
+       <li class="listitem">
+        <p id="ch10session4_13">
+         Eliminate the punctuation and spaces from the document.
+        </p>
+       </li>
+       <li class="listitem">
+        <p id="ch10session4_14">
+         Generate a list of words.
+        </p>
+       </li>
+       <li class="listitem">
+        <p id="ch10session4_15">
+         Count the words.
+        </p>
+       </li>
+      </ol>
+     </div>
+     <p id="ch10session4_16">
+      We first use
+      <code class="literal">
+       grep
+      </code>
+      and some elementary
+      <code class="literal">
+       regex
+      </code>
+      to eliminate the non-alpha-characters.
+     </p>
+     <pre class="programlisting">
+      $ grep "[A-Za-z]*" alice-in-wonderland.txt
+     </pre>
+     <p id="ch10session4_17">
+      This outputs all the lines which has any alphabetic characters on it. This isn't of much use, since we haven't done anything with the code. We only require the alphabetic characters, without any of the other junk.
+      <code class="literal">
+       man grep
+      </code>
+      shows us the
+      <code class="literal">
+       -o
+      </code>
+      option for outputting only the text which matches the regular expression.
+     </p>
+     <pre class="programlisting">
+      $ grep "[A-Za-z]*" -o alice-in-wonderland.txt
+     </pre>
+     <p id="ch10session4_18">
+      Not very surprisingly, we have all the words, spit out in the form of a list! Now that we have a list of words, it is quite simple to count the occurrences of the words. You would've realized that we can make use of
+      <code class="literal">
+       sort
+      </code>
+      and
+      <code class="literal">
+       uniq
+      </code>
+      commands. We pipe the output from the
+      <code class="literal">
+       grep
+      </code>
+      to the
+      <code class="literal">
+       sort
+      </code>
+      and then pipe it's output to
+      <code class="literal">
+       uniq
+      </code>
+      .
+     </p>
+     <pre class="programlisting">
+      $ grep "[A-Za-z]*" -o alice-in-wonderland.txt | sort | uniq -c
+     </pre>
+     <p id="ch10session4_19">
+      Notice that you get the list of all words in the document in the alphabetical order, with it's frequency written next to it. But, you might have observed that Capitalized words and lower case words are being counted as different words. We therefore, replace all the Upper case characters with lower case ones, using the
+      <code class="literal">
+       tr
+      </code>
+      command.
+     </p>
+     <pre class="programlisting">
+      $ grep  "[A-Za-z]*" -o alice-in-wonderland.txt | tr 'A-Z' 'a-z' | sort | uniq -c
+     </pre>
+     <p id="ch10session4_1a">
+      Now, it would also be nice to have the list ordered in the decreasing order of the frequency of the appearance of the words. We sort the output of the
+      <code class="literal">
+       uniq
+      </code>
+      command with
+      <code class="literal">
+       -n
+      </code>
+      and
+      <code class="literal">
+       -r
+      </code>
+      options, to get the desired output.
+     </p>
+     <pre class="programlisting">
+      $ grep  "[A-Za-z]*" -o alice-in-wonderland.txt | tr 'A-Z' 'a-z' | sort | uniq -c | sort -nr
+     </pre>
+    </div>
+    <div class="section" title="3.Basic editing and editors">
+     <div class="titlepage">
+      <div>
+       <div>
+        <h2 class="title" style="clear: both">
+         <a name="id2553109">
+         </a>
+         3.Basic editing and editors
+        </h2>
+       </div>
+      </div>
+     </div>
+     <div class="section" title="3.1.vim">
+      <div class="titlepage">
+       <div>
+        <div>
+         <h3 class="title">
+          <a name="id2553118">
+          </a>
+          3.1.vim
+         </h3>
+        </div>
+       </div>
+      </div>
+      <p id="ch10session4_1b">
+       Vim is a very powerful editor. It has a lot of commands, and all of them cannot be explained here. We shall try and look at a few, so that you can find your way around in vim.
+      </p>
+      <p id="ch10session4_1c">
+       To open a file in vim, we pass the filename as a parameter to the
+       <code class="literal">
+        vim
+       </code>
+       command. If a file with that filename does not exist, a new file is created.
+      </p>
+      <pre class="programlisting">
+       $ vim first.txt
+      </pre>
+      <p id="ch10session4_1d">
+       To start inserting text into the new file that we have opened, we need to press the
+       <code class="literal">
+        i
+       </code>
+       key. This will take us into the
+       <span class="emphasis">
+        <em>
+         insert
+        </em>
+       </span>
+       mode from the
+       <span class="emphasis">
+        <em>
+         command
+        </em>
+       </span>
+       mode. Hitting the
+       <code class="literal">
+        esc
+       </code>
+       key, will bring us back to the
+       <span class="emphasis">
+        <em>
+         command
+        </em>
+       </span>
+       mode. There is also another mode of vim, called the
+       <span class="emphasis">
+        <em>
+         visual
+        </em>
+       </span>
+       mode which will be discussed later in the course.
+      </p>
+      <p id="ch10session4_1e">
+       In general, it is good to spend as little time as possible in the insert mode and extensively use the command mode to achieve various tasks.
+      </p>
+      <p id="ch10session4_1f">
+       To save the file, use
+       <code class="literal">
+        :w
+       </code>
+       in the command mode. From here on, it is understood that we are in the command mode, whenever we are issuing any command to vim.
+      </p>
+      <p id="ch10session4_20">
+       To save a file and continue editing, use
+       <code class="literal">
+        :w FILENAME
+       </code>
+       The file name is optional. If you do not specify a filename, it is saved in the same file that you opened. If a file name different from the one you opened is specified, the text is saved with the new name, but you continue editing the file that you opened. The next time you save it without specifying a name, it gets saved with the name of the file that you initially opened.
+      </p>
+      <p id="ch10session4_21">
+       To save file with a new name and continue editing the new file, use
+       <code class="literal">
+        :saveas FILENAME
+       </code>
+      </p>
+      <p id="ch10session4_22">
+       To save and quit, use
+       <code class="literal">
+        :wq
+       </code>
+      </p>
+      <p id="ch10session4_23">
+       To quit, use
+       <code class="literal">
+        :q
+       </code>
+      </p>
+      <p id="ch10session4_24">
+       To quit without saving, use
+       <code class="literal">
+        :q!
+       </code>
+      </p>
+      <div class="section" title="3.1.1.Moving around">
+       <div class="titlepage">
+        <div>
+         <div>
+          <h4 class="title">
+           <a name="id2553239">
+           </a>
+           3.1.1.Moving around
+          </h4>
+         </div>
+        </div>
+       </div>
+       <p id="ch10session4_25">
+        While you are typing in a file, it is in-convenient to keep moving your fingers from the standard position for typing to the arrow keys. Vim, therefore, provides alternate keys for moving in the document. Note again that, you should be in the command mode, when issuing any commands to vim.
+       </p>
+       <p id="ch10session4_26">
+        The basic cursor movement can be achieved using the keys,
+        <code class="literal">
+         h
+        </code>
+        (left),
+        <code class="literal">
+         l
+        </code>
+        (right),
+        <code class="literal">
+         k
+        </code>
+        (up) and
+        <code class="literal">
+         j
+        </code>
+        (down).
+       </p>
+       <pre class="programlisting">
+        ^
+      k
+&lt; h       l &gt;
+      j
+      v
+       </pre>
+       <p id="ch10session4_27">
+        Note: Most commands can be prefixed with a number, to repeat the command. For instance,
+        <code class="literal">
+         10j
+        </code>
+        will move the cursor down 10 lines.
+       </p>
+       <div class="section" title="3.1.1.1.Moving within a line">
+        <div class="titlepage">
+         <div>
+          <div>
+           <h5 class="title">
+            <a name="id2553291">
+            </a>
+            3.1.1.1.Moving within a line
+           </h5>
+          </div>
+         </div>
+        </div>
+        <p id="ch10session4_28">
+         Cursor Movement
+        </p>
+        <p id="ch10session4_29">
+         Command
+        </p>
+        <p id="ch10session4_2a">
+         Forward by a screenful of text
+        </p>
+        <p id="ch10session4_2b">
+         <code class="literal">
+          C-f
+         </code>
+        </p>
+        <p id="ch10session4_2c">
+         Backward by a screenful of text
+        </p>
+        <p id="ch10session4_2d">
+         <code class="literal">
+          C-b
+         </code>
+        </p>
+        <p id="ch10session4_2e">
+         Beginning of the screen
+        </p>
+        <p id="ch10session4_2f">
+         <code class="literal">
+          H
+         </code>
+        </p>
+        <p id="ch10session4_30">
+         Middle of the screen
+        </p>
+        <p id="ch10session4_31">
+         <code class="literal">
+          M
+         </code>
+        </p>
+        <p id="ch10session4_32">
+         End of the screen
+        </p>
+        <p id="ch10session4_33">
+         <code class="literal">
+          L
+         </code>
+        </p>
+        <p id="ch10session4_34">
+         End of file
+        </p>
+        <p id="ch10session4_35">
+         <code class="literal">
+          G
+         </code>
+        </p>
+        <p id="ch10session4_36">
+         Line number
+         <code class="literal">
+          num
+         </code>
+        </p>
+        <p id="ch10session4_37">
+         <code class="literal">
+          [num]G
+         </code>
+        </p>
+        <p id="ch10session4_38">
+         Beginning of file
+        </p>
+        <p id="ch10session4_39">
+         <code class="literal">
+          gg
+         </code>
+        </p>
+        <p id="ch10session4_3a">
+         Next occurrence of the text
+under the cursor
+        </p>
+        <p id="ch10session4_3b">
+         <code class="literal">
+          *
+         </code>
+        </p>
+        <p id="ch10session4_3c">
+         Previous occurrence of the text
+under the cursor
+        </p>
+        <p id="ch10session4_3d">
+         <code class="literal">
+          #
+         </code>
+        </p>
+        <p id="ch10session4_3e">
+         Note:
+         <code class="literal">
+          C-x
+         </code>
+         is
+         <code class="literal">
+          Ctrl
+         </code>
+         +
+         <code class="literal">
+          x
+         </code>
+        </p>
+       </div>
+      </div>
+      <div class="section" title="3.1.2.The visual mode">
+       <div class="titlepage">
+        <div>
+         <div>
+          <h4 class="title">
+           <a name="id2553434">
+           </a>
+           3.1.2.The visual mode
+          </h4>
+         </div>
+        </div>
+       </div>
+       <p id="ch10session4_3f">
+        The visual mode is a special mode that is not present in the original vi editor. It allows us to highlight text and perform actions on it. All the movement commands that have been discussed till now work in the visual mode also. The editing commands that will be discussed in the future work on the visual blocks selected, too.
+       </p>
+      </div>
+      <div class="section" title="3.1.3.Editing commands">
+       <div class="titlepage">
+        <div>
+         <div>
+          <h4 class="title">
+           <a name="id2553452">
+           </a>
+           3.1.3.Editing commands
+          </h4>
+         </div>
+        </div>
+       </div>
+       <p id="ch10session4_40">
+        The editing commands usually take the movements as arguments. A movement is equivalent to a selection in the visual mode. The cursor is assumed to have moved over the text in between the initial and the final points of the movement. The motion or the visual block that's been highlighted can be passed as arguments to the editing commands.
+       </p>
+       <p id="ch10session4_41">
+        Editing effect
+       </p>
+       <p id="ch10session4_42">
+        Command
+       </p>
+       <p id="ch10session4_43">
+        Cut the character under the cursor
+       </p>
+       <p id="ch10session4_44">
+        <code class="literal">
+         x
+        </code>
+       </p>
+       <p id="ch10session4_45">
+        Replace the character under the
+cursor with
+        <code class="literal">
+         a
+        </code>
+       </p>
+       <p id="ch10session4_46">
+        <code class="literal">
+         ra
+        </code>
+       </p>
+       <p id="ch10session4_47">
+        Cut an entire line
+       </p>
+       <p id="ch10session4_48">
+        <code class="literal">
+         dd
+        </code>
+       </p>
+       <p id="ch10session4_49">
+        Copy/yank an entire line
+       </p>
+       <p id="ch10session4_4a">
+        <code class="literal">
+         yy
+        </code>
+       </p>
+       <p id="ch10session4_4b">
+        Note: You can prefix numbers to any of the commands, to repeat them.
+       </p>
+      </div>
+      <div class="section" title="3.1.4.Undo and Redo">
+       <div class="titlepage">
+        <div>
+         <div>
+          <h4 class="title">
+           <a name="id2553532">
+           </a>
+           3.1.4.Undo and Redo
+          </h4>
+         </div>
+        </div>
+       </div>
+       <p id="ch10session4_4c">
+        You can undo almost anything using
+        <code class="literal">
+         u
+        </code>
+        .
+       </p>
+       <p id="ch10session4_4d">
+        To undo the undo command type
+        <code class="literal">
+         C-r
+        </code>
+       </p>
+      </div>
+      <div class="section" title="3.1.5.Searching and Replacing">
+       <div class="titlepage">
+        <div>
+         <div>
+          <h4 class="title">
+           <a name="id2553557">
+           </a>
+           3.1.5.Searching and Replacing
+          </h4>
+         </div>
+        </div>
+       </div>
+       <p id="ch10session4_4e">
+        Finding and Replacing
+       </p>
+       <p id="ch10session4_4f">
+        Command
+       </p>
+       <p id="ch10session4_50">
+        Replace the first instance of
+        <code class="literal">
+         old
+        </code>
+        with
+        <code class="literal">
+         new
+        </code>
+        in the current line.
+       </p>
+       <p id="ch10session4_51">
+        <code class="literal">
+         :s/old/new
+        </code>
+       </p>
+       <p id="ch10session4_52">
+        Replace all instances of
+        <code class="literal">
+         old
+        </code>
+        with
+        <code class="literal">
+         new
+        </code>
+        in the current line.
+       </p>
+       <p id="ch10session4_53">
+        <code class="literal">
+         :s/old/new/g
+        </code>
+       </p>
+       <p id="ch10session4_54">
+        Replace all instances of
+        <code class="literal">
+         old
+        </code>
+        with
+        <code class="literal">
+         new
+        </code>
+        in the current line,
+but ask for confirmation each time.
+       </p>
+       <p id="ch10session4_55">
+        <code class="literal">
+         :s/old/new/gc
+        </code>
+       </p>
+       <p id="ch10session4_56">
+        Replace the first instance of
+        <code class="literal">
+         old
+        </code>
+        with
+        <code class="literal">
+         new
+        </code>
+        in the entire file.
+       </p>
+       <p id="ch10session4_57">
+        <code class="literal">
+         :%s/old/new
+        </code>
+       </p>
+       <p id="ch10session4_58">
+        Replace all instances of
+        <code class="literal">
+         old
+        </code>
+        with
+        <code class="literal">
+         new
+        </code>
+        in the entire file.
+       </p>
+       <p id="ch10session4_59">
+        <code class="literal">
+         :%s/old/new/g
+        </code>
+       </p>
+       <p id="ch10session4_5a">
+        Replace all instances of
+        <code class="literal">
+         old
+        </code>
+        with
+        <code class="literal">
+         new
+        </code>
+        in the entire file but ask
+for confirmation each time.
+       </p>
+       <p id="ch10session4_5b">
+        <code class="literal">
+         :%s/old/new/gc
+        </code>
+       </p>
+      </div>
+     </div>
+     <div class="section" title="3.2.SciTE">
+      <div class="titlepage">
+       <div>
+        <div>
+         <h3 class="title">
+          <a name="id2553684">
+          </a>
+          3.2.SciTE
+         </h3>
+        </div>
+       </div>
+      </div>
+      <p id="ch10session4_5c">
+       SciTE is a
+       <span class="emphasis">
+        <em>
+         source code
+        </em>
+       </span>
+       editor, that has a feel similar to the commonly used GUI text editors. It has a wide range of features that are extremely useful for a programmer, editing code. Also it aims to keep configuration simple, and the user needs to edit a text file to configure SciTE to his/her liking.
+      </p>
+      <p id="ch10session4_5d">
+       Opening, Saving, Editing files with SciTE is extremely simple and trivial. Knowledge of using a text editor will suffice.
+      </p>
+      <p id="ch10session4_5e">
+       SciTE can syntax highlight code in various languages. It also has auto-indentation, code-folding and other such features which are useful when editing code.
+      </p>
+      <p id="ch10session4_5f">
+       SciTE also gives you the option to (compile and) run your code, from within the editor.
+      </p>
+     </div>
+    </div>
+    <div class="section" title="4.Personalizing your Environment">
+     <div class="titlepage">
+      <div>
+       <div>
+        <h2 class="title" style="clear: both">
+         <a name="id2553729">
+         </a>
+         4.Personalizing your Environment
+        </h2>
+       </div>
+      </div>
+     </div>
+     <div class="section" title="4.1..bashrc">
+      <div class="titlepage">
+       <div>
+        <div>
+         <h3 class="title">
+          <a name="id2553738">
+          </a>
+          4.1..bashrc
+         </h3>
+        </div>
+       </div>
+      </div>
+      <p id="ch10session4_60">
+       What would you do, if you want bash to execute a particular command each time you start it up? For instance, say you want the current directory to be your Desktop instead of your home folder, each time bash starts up. How would you achieve this? Bash reads and executes commands in a whole bunch of files called start-up files, when it starts up.
+      </p>
+      <p id="ch10session4_61">
+       When bash starts up as an interactive login shell, it reads the files
+       <code class="literal">
+        /etc/profile
+       </code>
+       ,
+       <code class="literal">
+        ~/.bash_profile
+       </code>
+       ,
+       <code class="literal">
+        ~/.bash_login
+       </code>
+       , and
+       <code class="literal">
+        ~/.profile
+       </code>
+       in that order.
+      </p>
+      <p id="ch10session4_62">
+       When it is a shell that is not a login shell,
+       <code class="literal">
+        ~/.bashrc
+       </code>
+       is read and the commands in it are executed. This can be prevented using the
+       <code class="literal">
+        --norc
+       </code>
+       option. To force bash to use another file, instead of the
+       <code class="literal">
+        ~/.bashrc
+       </code>
+       file on start-up, the
+       <code class="literal">
+        --rcfile
+       </code>
+       option may be used.
+      </p>
+      <p id="ch10session4_63">
+       Now, you know what you should do, to change the current directory to you Desktop. Just put a
+       <code class="literal">
+        cd ~/Desktop
+       </code>
+       into your
+       <code class="literal">
+        ~/.bashrc
+       </code>
+       and you are set!
+      </p>
+      <p id="ch10session4_64">
+       This example is quite a simple and lame one. The start-up files are used for a lot more complex things than this. You could set (or unset) aliases and a whole bunch of environment variables in the
+       <code class="literal">
+        .bashrc
+       </code>
+       . We shall look at them, in the next section where we look at environment variables and
+       <code class="literal">
+        set
+       </code>
+       command.
+      </p>
+     </div>
+     <div class="section" title="4.2..vimrc">
+      <div class="titlepage">
+       <div>
+        <div>
+         <h3 class="title">
+          <a name="id2554039">
+          </a>
+          4.2..vimrc
+         </h3>
+        </div>
+       </div>
+      </div>
+      <p id="ch10session4_65">
+       <code class="literal">
+        .vimrc
+       </code>
+       is a file similar to
+       <code class="literal">
+        .bashrc
+       </code>
+       for vim. It is a start-up file that vim reads and executes, each time it starts up. The options that you would like to be set every time you use vim, are placed in the
+       <code class="literal">
+        .vimrc
+       </code>
+       file, so that they are automatically set each time vim starts. The recommended place for having your
+       <code class="literal">
+        .vimrc
+       </code>
+       is also your home directory.
+      </p>
+      <p id="ch10session4_66">
+       The file
+       <code class="literal">
+        /etc/vimrc
+       </code>
+       is the global config file and shouldn't usually be edited. You can instead edit the
+       <code class="literal">
+        ~/.vimrc
+       </code>
+       file that is present in your home folder.
+      </p>
+      <p id="ch10session4_67">
+       There are a whole bunch of variables that you could set in the
+       <code class="literal">
+        .vimrc
+       </code>
+       file. You can look at all the options available, using the
+       <code class="literal">
+        :set all
+       </code>
+       command in vim. You could use the
+       <code class="literal">
+        :help option_name
+       </code>
+       to get more information about the option that you want to set. Once you are comfortable with what you want to set a particular variable to, you could add it to
+       <code class="literal">
+        .vimrc
+       </code>
+       . You should also look at
+       <code class="literal">
+        :help vimrc
+       </code>
+       for more info on the
+       <code class="literal">
+        .vimrc
+       </code>
+       file. If you already have a
+       <code class="literal">
+        .vimrc
+       </code>
+       file, you can edit it from within vim, using
+       <code class="literal">
+        :e $MYVIMRC
+       </code>
+       command. We shall look at some of the most commonly used options.
+      </p>
+      <p id="ch10session4_68">
+       Command
+      </p>
+      <p id="ch10session4_69">
+       Vim action
+      </p>
+      <p id="ch10session4_6a">
+       <code class="literal">
+        set nocompatible
+       </code>
+      </p>
+      <p id="ch10session4_6b">
+       Explicitly disable compatibility with vi
+      </p>
+      <p id="ch10session4_6c">
+       <code class="literal">
+        set backspace=indent,eol,start
+       </code>
+      </p>
+      <p id="ch10session4_6d">
+       In the insert mode, vim allows the backspace key to delete white spaces at the
+start of line, line breaks and the character before which insert mode started.
+      </p>
+      <p id="ch10session4_6e">
+       set autoindent
+      </p>
+      <p id="ch10session4_6f">
+       Vim indents a new line with the same indentation of the previous line.
+      </p>
+      <p id="ch10session4_70">
+       set backup
+      </p>
+      <p id="ch10session4_71">
+       Vim keeps a backup copy of a file when overwriting it.
+      </p>
+      <p id="ch10session4_72">
+       set history=50
+      </p>
+      <p id="ch10session4_73">
+       Vim keeps 50 commands and 50 search patterns in the history.
+      </p>
+      <p id="ch10session4_74">
+       set ruler
+      </p>
+      <p id="ch10session4_75">
+       Displays the current cursor position in the lower right corner of the vim window.
+      </p>
+      <p id="ch10session4_76">
+       set showcmd
+      </p>
+      <p id="ch10session4_77">
+       Displays the incomplete command in the lower right corner.
+      </p>
+      <p id="ch10session4_78">
+       set incsearch
+      </p>
+      <p id="ch10session4_79">
+       Turns on incremental searching. Displays search results while you type.
+      </p>
+      <p id="ch10session4_7a">
+       You can see the effect of the changes made to your
+       <code class="literal">
+        .vimrc
+       </code>
+       file by restarting vim. If you want to see the changes that you made to your
+       <code class="literal">
+        .vimrc
+       </code>
+       file immediately, you could source the file from within vim.
+      </p>
+      If the
+      <code class="literal">
+       .vimrc
+      </code>
+      file has been sourced when this instance of vim was started, you could just resource the file again::
+      <p id="ch10session4_7b">
+       :so $MYVIMRC
+      </p>
+      <p id="ch10session4_7c">
+       If you just created the
+       <code class="literal">
+        .vimrc
+       </code>
+       file or it was not sourced when you stared this instance of vim, just replace the
+       <code class="literal">
+        $MYVIMRC
+       </code>
+       variable above, with the location of the
+       <code class="literal">
+        .vimrc
+       </code>
+       file that you created/edited.
+      </p>
+     </div>
+    </div>
+    <div class="section" title="5.Subshells and source">
+     <div class="titlepage">
+      <div>
+       <div>
+        <h2 class="title" style="clear: both">
+         <a name="id2554257">
+         </a>
+         5.Subshells and
+         <code class="literal">
+          source
+         </code>
+        </h2>
+       </div>
+      </div>
+     </div>
+     <p id="ch10session4_7d">
+      A subshell is just a separate instance of the shell which is a child process of the shell that launches it. Bash creates a subshell in various circumstances. Creation of subshells allows the execution of various processes simultaneously.
+     </p>
+     <div class="itemizedlist">
+      <ul class="itemizedlist" type="*">
+       <li class="listitem" style="list-style-type: *">
+        <p id="ch10session4_7e">
+         When an external command is executed, a new subshell is created. Any built-in commands of bash are executed with int the same shell, and no new subshell is started. When an external command is run, the bash shell copies itself (along with it's environment) creating a subshell and the process is changed to the external command executed. The subshell is a child process of this shell.
+        </p>
+       </li>
+       <li class="listitem" style="list-style-type: *">
+        <p id="ch10session4_7f">
+         Any pipes being used, create a subshell. The commands on the input and output ends of the pipe are run in different subshells.
+        </p>
+       </li>
+       <li class="listitem" style="list-style-type: *">
+        <p id="ch10session4_80">
+         You could also, explicitly tell bash to start a subshell by enclosing a list of commands between parentheses. Each of the commands in the list is executed within a single new subshell.
+        </p>
+       </li>
+      </ul>
+     </div>
+     <p id="ch10session4_81">
+      To avoid creating a subshell, when running a shell script, you could use the
+      <code class="literal">
+       source
+      </code>
+      command.
+     </p>
+     <pre class="programlisting">
+      $ source script.sh
+     </pre>
+     <p id="ch10session4_82">
+      This will run the
+      <code class="literal">
+       script.sh
+      </code>
+      within the present shell without creating a subshell. The
+      <code class="literal">
+       .
+      </code>
+      command is an alias for the source command.
+      <code class="literal">
+       . script.sh
+      </code>
+      is therefore equivalent to
+      <code class="literal">
+       source script.sh
+      </code>
+      .
+     </p>
+    </div>
+   </div>
+  </div>
+ </body>
+</html>
--- a/SEESenv/web/html/chn11Section_5.html	Tue Feb 23 19:56:48 2010 +0530
+++ b/SEESenv/web/html/chn11Section_5.html	Thu Feb 25 00:04:27 2010 +0530
@@ -15,7 +15,7 @@
   </script>
  </head>
  <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
-  <div class="chapter" id="ch11Section_5">
+  <div class="chapter" id="chn11Section_5">
    <div class="titlepage">
    </div>
    <div class="toc">
@@ -27,7 +27,7 @@
     <dl>
      <dt>
       <span class="article">
-       <a href="#id2805047">
+       <a href="#id2886967">
        </a>
       </span>
      </dt>
@@ -35,14 +35,14 @@
       <dl>
        <dt>
         <span class="section">
-         <a href="#id2615138">
+         <a href="#id2697058">
           1. Module Objectives:
          </a>
         </span>
        </dt>
        <dt>
         <span class="section">
-         <a href="#id2803399">
+         <a href="#id2885319">
           2. tar:
          </a>
         </span>
@@ -51,21 +51,21 @@
         <dl>
          <dt>
           <span class="section">
-           <a href="#id2803952">
+           <a href="#id2885872">
             2.1. Introduction:
            </a>
           </span>
          </dt>
          <dt>
           <span class="section">
-           <a href="#id2856019">
+           <a href="#id2937939">
             2.2. Getting Started(go go go!):
            </a>
           </span>
          </dt>
          <dt>
           <span class="section">
-           <a href="#id2856298">
+           <a href="#id2938218">
             2.3. Further Reading for this section:
            </a>
           </span>
@@ -74,7 +74,7 @@
        </dd>
        <dt>
         <span class="section">
-         <a href="#id2856343">
+         <a href="#id2938263">
           3. GZip:
          </a>
         </span>
@@ -83,14 +83,14 @@
         <dl>
          <dt>
           <span class="section">
-           <a href="#id2856368">
+           <a href="#id2938288">
             3.1. Get going:
            </a>
           </span>
          </dt>
          <dt>
           <span class="section">
-           <a href="#id2856622">
+           <a href="#id2938542">
             3.2. Further Reading for this section:
            </a>
           </span>
@@ -99,7 +99,7 @@
        </dd>
        <dt>
         <span class="section">
-         <a href="#id2856676">
+         <a href="#id2938596">
           4. File Comparisons:
          </a>
         </span>
@@ -108,21 +108,21 @@
         <dl>
          <dt>
           <span class="section">
-           <a href="#id2856693">
+           <a href="#id2938613">
             4.1. cmp:
            </a>
           </span>
          </dt>
          <dt>
           <span class="section">
-           <a href="#id2856735">
+           <a href="#id2938655">
             4.2. diff:
            </a>
           </span>
          </dt>
          <dt>
           <span class="section">
-           <a href="#id2856817">
+           <a href="#id2938737">
             4.3. comm:
            </a>
           </span>
@@ -131,7 +131,7 @@
        </dd>
        <dt>
         <span class="section">
-         <a href="#id2856847">
+         <a href="#id2938767">
           5. Environment Variables:
          </a>
         </span>
@@ -140,7 +140,7 @@
         <dl>
          <dt>
           <span class="section">
-           <a href="#id2856946">
+           <a href="#id2938866">
             5.1. Further Reading:
            </a>
           </span>
@@ -149,7 +149,7 @@
        </dd>
        <dt>
         <span class="section">
-         <a href="#id2857001">
+         <a href="#id2938921">
           6. Shell Scripting:
          </a>
         </span>
@@ -158,42 +158,42 @@
         <dl>
          <dt>
           <span class="section">
-           <a href="#id2857009">
+           <a href="#id2938929">
             6.1. Basics:
            </a>
           </span>
          </dt>
          <dt>
           <span class="section">
-           <a href="#id2855367">
+           <a href="#id2937287">
             6.2. Shell Arithmetic:
            </a>
           </span>
          </dt>
          <dt>
           <span class="section">
-           <a href="#id2857386">
+           <a href="#id2939306">
             6.3. if else construct:
            </a>
           </span>
          </dt>
          <dt>
           <span class="section">
-           <a href="#id2857492">
+           <a href="#id2939412">
             6.4. Loops
            </a>
           </span>
          </dt>
          <dt>
           <span class="section">
-           <a href="#id2857738">
+           <a href="#id2939658">
             6.5. Functions
            </a>
           </span>
          </dt>
          <dt>
           <span class="section">
-           <a href="#id2857809">
+           <a href="#id2939729">
             6.6. Further Reading:
            </a>
           </span>
@@ -208,11 +208,11 @@
     <div class="titlepage">
      <div>
       <div>
-       <h2 class="title" id="id2805047">
+       <h2 class="title" id="id2886967">
        </h2>
       </div>
       <div>
-       <h2 class="title" id="id2805047">
+       <h2 class="title" id="id2886967">
        </h2>
       </div>
      </div>
@@ -227,14 +227,14 @@
      <dl>
       <dt>
        <span class="section">
-        <a href="#id2615138">
+        <a href="#id2697058">
          1. Module Objectives:
         </a>
        </span>
       </dt>
       <dt>
        <span class="section">
-        <a href="#id2803399">
+        <a href="#id2885319">
          2. tar:
         </a>
        </span>
@@ -243,21 +243,21 @@
        <dl>
         <dt>
          <span class="section">
-          <a href="#id2803952">
+          <a href="#id2885872">
            2.1. Introduction:
           </a>
          </span>
         </dt>
         <dt>
          <span class="section">
-          <a href="#id2856019">
+          <a href="#id2937939">
            2.2. Getting Started(go go go!):
           </a>
          </span>
         </dt>
         <dt>
          <span class="section">
-          <a href="#id2856298">
+          <a href="#id2938218">
            2.3. Further Reading for this section:
           </a>
          </span>
@@ -266,7 +266,7 @@
       </dd>
       <dt>
        <span class="section">
-        <a href="#id2856343">
+        <a href="#id2938263">
          3. GZip:
         </a>
        </span>
@@ -275,14 +275,14 @@
        <dl>
         <dt>
          <span class="section">
-          <a href="#id2856368">
+          <a href="#id2938288">
            3.1. Get going:
           </a>
          </span>
         </dt>
         <dt>
          <span class="section">
-          <a href="#id2856622">
+          <a href="#id2938542">
            3.2. Further Reading for this section:
           </a>
          </span>
@@ -291,7 +291,7 @@
       </dd>
       <dt>
        <span class="section">
-        <a href="#id2856676">
+        <a href="#id2938596">
          4. File Comparisons:
         </a>
        </span>
@@ -300,21 +300,21 @@
        <dl>
         <dt>
          <span class="section">
-          <a href="#id2856693">
+          <a href="#id2938613">
            4.1. cmp:
           </a>
          </span>
         </dt>
         <dt>
          <span class="section">
-          <a href="#id2856735">
+          <a href="#id2938655">
            4.2. diff:
           </a>
          </span>
         </dt>
         <dt>
          <span class="section">
-          <a href="#id2856817">
+          <a href="#id2938737">
            4.3. comm:
           </a>
          </span>
@@ -323,7 +323,7 @@
       </dd>
       <dt>
        <span class="section">
-        <a href="#id2856847">
+        <a href="#id2938767">
          5. Environment Variables:
         </a>
        </span>
@@ -332,7 +332,7 @@
        <dl>
         <dt>
          <span class="section">
-          <a href="#id2856946">
+          <a href="#id2938866">
            5.1. Further Reading:
           </a>
          </span>
@@ -341,7 +341,7 @@
       </dd>
       <dt>
        <span class="section">
-        <a href="#id2857001">
+        <a href="#id2938921">
          6. Shell Scripting:
         </a>
        </span>
@@ -350,42 +350,42 @@
        <dl>
         <dt>
          <span class="section">
-          <a href="#id2857009">
+          <a href="#id2938929">
            6.1. Basics:
           </a>
          </span>
         </dt>
         <dt>
          <span class="section">
-          <a href="#id2855367">
+          <a href="#id2937287">
            6.2. Shell Arithmetic:
           </a>
          </span>
         </dt>
         <dt>
          <span class="section">
-          <a href="#id2857386">
+          <a href="#id2939306">
            6.3. if else construct:
           </a>
          </span>
         </dt>
         <dt>
          <span class="section">
-          <a href="#id2857492">
+          <a href="#id2939412">
            6.4. Loops
           </a>
          </span>
         </dt>
         <dt>
          <span class="section">
-          <a href="#id2857738">
+          <a href="#id2939658">
            6.5. Functions
           </a>
          </span>
         </dt>
         <dt>
          <span class="section">
-          <a href="#id2857809">
+          <a href="#id2939729">
            6.6. Further Reading:
           </a>
          </span>
@@ -399,7 +399,7 @@
       <div>
        <div>
         <h2 class="title" style="clear: both">
-         <a name="id2615138">
+         <a name="id2697058">
          </a>
          1.Module Objectives:
         </h2>
@@ -426,7 +426,7 @@
       <div>
        <div>
         <h2 class="title" style="clear: both">
-         <a name="id2803399">
+         <a name="id2885319">
          </a>
          2.tar:
         </h2>
@@ -438,7 +438,7 @@
        <div>
         <div>
          <h3 class="title">
-          <a name="id2803952">
+          <a name="id2885872">
           </a>
           2.1.Introduction:
          </h3>
@@ -475,7 +475,7 @@
        <div>
         <div>
          <h3 class="title">
-          <a name="id2856019">
+          <a name="id2937939">
           </a>
           2.2.Getting Started(go go go!):
          </h3>
@@ -521,7 +521,7 @@
         <div>
          <div>
           <h4 class="title">
-           <a name="id2856073">
+           <a name="id2937993">
            </a>
            2.2.1.Creating a tar archive:
           </h4>
@@ -650,7 +650,7 @@
         <div>
          <div>
           <h4 class="title">
-           <a name="id2856213">
+           <a name="id2938133">
            </a>
            2.2.2.Listing the files of archive:
           </h4>
@@ -701,7 +701,7 @@
         <div>
          <div>
           <h4 class="title">
-           <a name="id2856263">
+           <a name="id2938183">
            </a>
            2.2.3.Extracting files from archive:
           </h4>
@@ -746,7 +746,7 @@
        <div>
         <div>
          <h3 class="title">
-          <a name="id2856298">
+          <a name="id2938218">
           </a>
           2.3.Further Reading for this section:
          </h3>
@@ -797,7 +797,7 @@
       <div>
        <div>
         <h2 class="title" style="clear: both">
-         <a name="id2856343">
+         <a name="id2938263">
          </a>
          3.GZip:
         </h2>
@@ -824,7 +824,7 @@
        <div>
         <div>
          <h3 class="title">
-          <a name="id2856368">
+          <a name="id2938288">
           </a>
           3.1.Get going:
          </h3>
@@ -861,7 +861,7 @@
         <div>
          <div>
           <h4 class="title">
-           <a name="id2856399">
+           <a name="id2938319">
            </a>
            3.1.1.Creating zip files:
           </h4>
@@ -1088,7 +1088,7 @@
        <div>
         <div>
          <h3 class="title">
-          <a name="id2856622">
+          <a name="id2938542">
           </a>
           3.2.Further Reading for this section:
          </h3>
@@ -1149,7 +1149,7 @@
       <div>
        <div>
         <h2 class="title" style="clear: both">
-         <a name="id2856676">
+         <a name="id2938596">
          </a>
          4.File Comparisons:
         </h2>
@@ -1164,7 +1164,7 @@
        <div>
         <div>
          <h3 class="title">
-          <a name="id2856693">
+          <a name="id2938613">
           </a>
           4.1.cmp:
          </h3>
@@ -1197,7 +1197,7 @@
        <div>
         <div>
          <h3 class="title">
-          <a name="id2856735">
+          <a name="id2938655">
           </a>
           4.2.diff:
          </h3>
@@ -1270,7 +1270,7 @@
        <div>
         <div>
          <h3 class="title">
-          <a name="id2856817">
+          <a name="id2938737">
           </a>
           4.3.comm:
          </h3>
@@ -1302,7 +1302,7 @@
       <div>
        <div>
         <h2 class="title" style="clear: both">
-         <a name="id2856847">
+         <a name="id2938767">
          </a>
          5.Environment Variables:
         </h2>
@@ -1381,7 +1381,7 @@
        <div>
         <div>
          <h3 class="title">
-          <a name="id2856946">
+          <a name="id2938866">
           </a>
           5.1.Further Reading:
          </h3>
@@ -1439,7 +1439,7 @@
       <div>
        <div>
         <h2 class="title" style="clear: both">
-         <a name="id2857001">
+         <a name="id2938921">
          </a>
          6.Shell Scripting:
         </h2>
@@ -1451,7 +1451,7 @@
        <div>
         <div>
          <h3 class="title">
-          <a name="id2857009">
+          <a name="id2938929">
           </a>
           6.1.Basics:
          </h3>
@@ -1554,7 +1554,7 @@
        <div>
         <div>
          <h3 class="title">
-          <a name="id2855367">
+          <a name="id2937287">
           </a>
           6.2.Shell Arithmetic:
          </h3>
@@ -1615,7 +1615,7 @@
        <div>
         <div>
          <h3 class="title">
-          <a name="id2857386">
+          <a name="id2939306">
           </a>
           6.3.if else construct:
          </h3>
@@ -1747,7 +1747,7 @@
        <div>
         <div>
          <h3 class="title">
-          <a name="id2857492">
+          <a name="id2939412">
           </a>
           6.4.Loops
          </h3>
@@ -1774,7 +1774,7 @@
         <div>
          <div>
           <h4 class="title">
-           <a name="id2857514">
+           <a name="id2939434">
            </a>
            6.4.1.
            <code class="literal">
@@ -1888,7 +1888,7 @@
         <div>
          <div>
           <h4 class="title">
-           <a name="id2857633">
+           <a name="id2939553">
            </a>
            6.4.2.
            <code class="literal">
@@ -1942,7 +1942,7 @@
         <div>
          <div>
           <h4 class="title">
-           <a name="id2857683">
+           <a name="id2939603">
            </a>
            6.4.3.
            <code class="literal">
@@ -2019,7 +2019,7 @@
        <div>
         <div>
          <h3 class="title">
-          <a name="id2857738">
+          <a name="id2939658">
           </a>
           6.5.Functions
          </h3>
@@ -2095,7 +2095,7 @@
        <div>
         <div>
          <h3 class="title">
-          <a name="id2857809">
+          <a name="id2939729">
           </a>
           6.6.Further Reading:
          </h3>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SEESenv/web/html/chn12index.html	Thu Feb 25 00:04:27 2010 +0530
@@ -0,0 +1,49 @@
+<html>
+ <head>
+  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+  <title>
+   Chapter. index
+  </title>
+  <link rel="stylesheet" href="/review/support/styles.css" type="text/css" />
+  <meta name="generator" content="DocBook XSL Stylesheets V1.74.3" />
+  <link rel="shortcut icon" type="image/png" href="/review/support/figs/favicon.png" />
+  <script type="text/javascript" src="/review/support/jquery-min.js">
+  </script>
+  <script type="text/javascript" src="/review/support/form.js">
+  </script>
+  <script type="text/javascript" src="/review/support/hsbook.js">
+  </script>
+ </head>
+ <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+  <div class="chapter" id="chn12index">
+   <div class="titlepage">
+   </div>
+   <div class="toc">
+    <p>
+     <b>
+      Table of Contents
+     </b>
+    </p>
+    <dl>
+     <dt>
+      <span class="article">
+       <a href="#id2690769">
+       </a>
+      </span>
+     </dt>
+    </dl>
+   </div>
+   <div class="article">
+    <div class="titlepage">
+     <div>
+      <div>
+       <h2 class="title" id="id2690769">
+       </h2>
+      </div>
+     </div>
+     <hr />
+    </div>
+   </div>
+  </div>
+ </body>
+</html>