diff --git a/en_US.ISO8859-1/books/handbook/basics/chapter.xml b/en_US.ISO8859-1/books/handbook/basics/chapter.xml index c91881ea14..bbe1ddc79f 100644 --- a/en_US.ISO8859-1/books/handbook/basics/chapter.xml +++ b/en_US.ISO8859-1/books/handbook/basics/chapter.xml @@ -3143,14 +3143,15 @@ Swap: 2048M Total, 2048M Free <indexterm><primary>shells</primary></indexterm> <indexterm><primary>command line</primary></indexterm> - <para>A <firstterm>shell</firstterm> provides a command line interface for interacting with the operating system. A - shell receives commands from the input channel and executes - them. Many shells provide built in functions to help with - everyday tasks such as file management, file globbing, command - line editing, command macros, and environment variables. &os; - comes with several shells, including the Bourne shell - (&man.sh.1;) and the extended C shell (&man.tcsh.1;). Other - shells are available from the &os; Ports Collection, such as + <para>A <firstterm>shell</firstterm> provides a command line + interface for interacting with the operating system. A shell + receives commands from the input channel and executes them. + Many shells provide built in functions to help with everyday + tasks such as file management, file globbing, command line + editing, command macros, and environment variables. &os; comes + with several shells, including the Bourne shell (&man.sh.1;) and + the extended C shell (&man.tcsh.1;). Other shells are available + from the &os; Ports Collection, such as <command>zsh</command> and <command>bash</command>.</para> <para>The shell that is used is really a matter of taste. A C @@ -3162,11 +3163,10 @@ Swap: 2048M Total, 2048M Free <para>One common shell feature is filename completion. After a user types the first few letters of a command or filename and - presses <keycap>Tab</keycap>, the shell automatically - completes the rest of the command or filename. Consider two - files called <filename>foobar</filename> and - <filename>foo.bar</filename>. To delete - <filename>foo.bar</filename>, type <command>rm + presses <keycap>Tab</keycap>, the shell automatically completes + the rest of the command or filename. Consider two files called + <filename>foobar</filename> and <filename>foo.bar</filename>. + To delete <filename>foo.bar</filename>, type <command>rm fo[<keycap>Tab</keycap>].[<keycap>Tab</keycap>]</command>.</para> <para>The shell should print out @@ -3177,8 +3177,8 @@ Swap: 2048M Total, 2048M Free is more than one match. Both <filename>foobar</filename> and <filename>foo.bar</filename> start with <literal>fo</literal>. By typing <literal>.</literal>, then pressing - <keycap>Tab</keycap> again, the shell is able to fill in - the rest of the filename.</para> + <keycap>Tab</keycap> again, the shell is able to fill in the + rest of the filename.</para> <indexterm><primary>environment variables</primary></indexterm> @@ -3186,9 +3186,9 @@ Swap: 2048M Total, 2048M Free variables. Environment variables are a variable/key pair stored in the shell's environment. This environment can be read by any program invoked by the shell, and thus contains a lot of program - configuration. Table 4.3 provides a list of common environment variables - and their meanings. Note that the names of environment - variables are always in uppercase.</para> + configuration. Table 4.3 provides a list of common environment + variables and their meanings. Note that the names of + environment variables are always in uppercase.</para> <table frame="none" pgwide="1"> <title>Common Environment Variables</title> @@ -3296,18 +3296,19 @@ Swap: 2048M Total, 2048M Free <para>Shells treat special characters, known as meta-characters, as special representations of data. The most common meta-character is <literal>*</literal>, which represents any - number of characters in a filename. Meta-characters can be - used to perform filename globbing. For example, - <command>echo *</command> is equivalent to <command>ls</command> because + number of characters in a filename. Meta-characters can be used + to perform filename globbing. For example, <command>echo + *</command> is equivalent to <command>ls</command> because the shell takes all the files that match <literal>*</literal> - and <command>echo</command> lists them on the command line.</para> + and <command>echo</command> lists them on the command + line.</para> <para>To prevent the shell from interpreting a special character, escape it from the shell by starting it with a backslash - (<literal>\</literal>). For example, - <command>echo $TERM</command> prints the terminal setting - whereas <command>echo \$TERM</command> literally prints the - string <literal>$TERM</literal>.</para> + (<literal>\</literal>). For example, <command>echo + $TERM</command> prints the terminal setting whereas + <command>echo \$TERM</command> literally prints the string + <literal>$TERM</literal>.</para> <sect2 id="changing-shells"> <title>Changing the Shell</title> @@ -3316,8 +3317,8 @@ Swap: 2048M Total, 2048M Free to use <command>chsh</command>. Running this command will open the editor that is configured in the <envar>EDITOR</envar> environment variable, which by default - is set to &man.vi.1;. Change the <literal>Shell:</literal> line - to the full path of the new shell.</para> + is set to &man.vi.1;. Change the <literal>Shell:</literal> + line to the full path of the new shell.</para> <para>Alternately, use <command>chsh -s</command> which will set the specified shell without opening an editor. For example, @@ -3330,9 +3331,8 @@ Swap: 2048M Total, 2048M Free <filename>/etc/shells</filename>. If the shell was installed from the &os; Ports Collection as described in <xref linkend="ports"/>, it should be automatically added - to this file. If it is missing, add it using this - command, replacing the path with the path of the - shell:</para> + to this file. If it is missing, add it using this command, + replacing the path with the path of the shell:</para> <screen>&prompt.root; <userinput>echo <replaceable>/usr/local/bin/bash</replaceable> >> /etc/shells</userinput></screen> @@ -3424,98 +3424,97 @@ Swap: 2048M Total, 2048M Free <sect1 id="basics-more-information"> <title>Manual Pages</title> - <indexterm><primary>manual pages</primary></indexterm> + <indexterm><primary>manual pages</primary></indexterm> - <para>The most comprehensive documentation on &os; is in the - form of manual pages. Nearly every program on the system - comes with a short reference manual explaining the basic - operation and available arguments. These manuals can be - viewed using <command>man</command>:</para> + <para>The most comprehensive documentation on &os; is in the form + of manual pages. Nearly every program on the system comes with + a short reference manual explaining the basic operation and + available arguments. These manuals can be viewed using + <command>man</command>:</para> - <screen>&prompt.user; <userinput>man <replaceable>command</replaceable></userinput></screen> + <screen>&prompt.user; <userinput>man <replaceable>command</replaceable></userinput></screen> - <para>where <replaceable>command</replaceable> is the name of - the command to learn about. For example, to learn more about - &man.ls.1;, type:</para> + <para>where <replaceable>command</replaceable> is the name of the + command to learn about. For example, to learn more about + &man.ls.1;, type:</para> - <screen>&prompt.user; <userinput>man ls</userinput></screen> + <screen>&prompt.user; <userinput>man ls</userinput></screen> - <para>Manual pages are divided into sections which represent the type of topic. In &os;, - the following - sections are available:</para> + <para>Manual pages are divided into sections which represent the + type of topic. In &os;, the following sections are + available:</para> - <orderedlist> - <listitem> - <para>User commands.</para> - </listitem> + <orderedlist> + <listitem> + <para>User commands.</para> + </listitem> - <listitem> - <para>System calls and error numbers.</para> - </listitem> + <listitem> + <para>System calls and error numbers.</para> + </listitem> - <listitem> - <para>Functions in the C libraries.</para> - </listitem> + <listitem> + <para>Functions in the C libraries.</para> + </listitem> - <listitem> - <para>Device drivers.</para> - </listitem> + <listitem> + <para>Device drivers.</para> + </listitem> - <listitem> - <para>File formats.</para> - </listitem> + <listitem> + <para>File formats.</para> + </listitem> - <listitem> - <para>Games and other diversions.</para> - </listitem> + <listitem> + <para>Games and other diversions.</para> + </listitem> - <listitem> - <para>Miscellaneous information.</para> - </listitem> + <listitem> + <para>Miscellaneous information.</para> + </listitem> - <listitem> - <para>System maintenance and operation commands.</para> - </listitem> + <listitem> + <para>System maintenance and operation commands.</para> + </listitem> - <listitem> - <para>System kernel interfaces.</para> - </listitem> - </orderedlist> + <listitem> + <para>System kernel interfaces.</para> + </listitem> + </orderedlist> - <para>In some cases, the same topic may appear in more than one - section of the online manual. For example, there is a - <command>chmod</command> user command and a - <function>chmod()</function> system call. To tell &man.man.1; - which section to display, specify the section number:</para> + <para>In some cases, the same topic may appear in more than one + section of the online manual. For example, there is a + <command>chmod</command> user command and a + <function>chmod()</function> system call. To tell &man.man.1; + which section to display, specify the section number:</para> - <screen>&prompt.user; <userinput>man 1 chmod</userinput></screen> + <screen>&prompt.user; <userinput>man 1 chmod</userinput></screen> - <para>This will display the manual page for the user command - &man.chmod.1;. References to a particular section of the - online manual are traditionally placed in parenthesis in - written documentation, so &man.chmod.1; refers to the user - command and &man.chmod.2; refers to the system call.</para> + <para>This will display the manual page for the user command + &man.chmod.1;. References to a particular section of the + online manual are traditionally placed in parenthesis in + written documentation, so &man.chmod.1; refers to the user + command and &man.chmod.2; refers to the system call.</para> - <para>If the name of the manual page is unknown, use <command>man - -k</command> to search for keywords in the manual page - descriptions:</para> + <para>If the name of the manual page is unknown, use <command>man + -k</command> to search for keywords in the manual page + descriptions:</para> - <screen>&prompt.user; <userinput>man -k <replaceable>mail</replaceable></userinput></screen> + <screen>&prompt.user; <userinput>man -k <replaceable>mail</replaceable></userinput></screen> - <para>This command displays a list of commands that have the - keyword <quote>mail</quote> in their descriptions. This is - equivalent to using &man.apropos.1;.</para> + <para>This command displays a list of commands that have the + keyword <quote>mail</quote> in their descriptions. This is + equivalent to using &man.apropos.1;.</para> - <para>To read the descriptions for the commands in - <filename class="directory">/usr/bin</filename>, - type:</para> + <para>To read the descriptions for the commands in <filename + class="directory">/usr/bin</filename>, type:</para> - <screen>&prompt.user; <userinput>cd /usr/bin</userinput> + <screen>&prompt.user; <userinput>cd /usr/bin</userinput> &prompt.user; <userinput>man -f * | more</userinput></screen> - <para>or</para> + <para>or</para> - <screen>&prompt.user; <userinput>cd /usr/bin</userinput> + <screen>&prompt.user; <userinput>cd /usr/bin</userinput> &prompt.user; <userinput>whatis * |more</userinput></screen> <sect2 id="basics-info"> @@ -3525,14 +3524,13 @@ Swap: 2048M Total, 2048M Free <primary>Free Software Foundation</primary> </indexterm> - <para>&os; includes many applications and utilities produced - by the Free Software Foundation (FSF). In addition to manual + <para>&os; includes many applications and utilities produced by + the Free Software Foundation (FSF). In addition to manual pages, these programs may include hypertext documents called <literal>info</literal> files. These can be viewed using - &man.info.1; or, if - <filename role="package">editors/emacs</filename> is - installed, the info mode of - <application>emacs</application>.</para> + &man.info.1; or, if <filename + role="package">editors/emacs</filename> is installed, the + info mode of <application>emacs</application>.</para> <para>To use &man.info.1;, type:</para>