initial checkin

This commit is contained in:
gdr 1997-10-07 01:43:55 +00:00
parent 6ec822da35
commit e4e2dd505c
10 changed files with 16407 additions and 0 deletions

709
doc/refs.aug96/gsh.12.html Normal file
View File

@ -0,0 +1,709 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Microsoft FrontPage 2.0">
<title>GNO Shell User's Manual</title>
</head>
<body bgcolor="#FFFFFF">
<p align="right"><font size="7" face="Times"><b>GNO Shell User's
Manual</b></font></p>
<p align="right"><font size="5" face="Times">By Tim Meekins,
Albert Chin, and Jawaid Bazyar</font></p>
<p align="right"><font size="5" face="Times">Edited by Andrew
Roughan</font></p>
<p align="right">&nbsp;</p>
<p align="right">&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><font size="6" face="Times">Table of Contents</font></p>
<p>&nbsp;</p>
<p><b>Chapter 1 Getting started with the GNO Shell </b></p>
<dir>
<li>Introduction <br>
Customizing the Shell Environment <br>
Invoking gsh </li>
</dir>
<p><b>Chapter 2 Interacting with the GNO Shell </b></p>
<dir>
<li>Executing Commands <br>
Command-line Editor <br>
Command Input <br>
Command Editing <br>
History Editing Keys<br>
Command, Filename and Variable completion </li>
</dir>
<p><b>Chapter 3 Using the GNO Shell more productively </b></p>
<dir>
<li>What does this command do? <br>
Option Arguments <br>
Entering Multiple commands <br>
Using Aliases as Shorthand <br>
Redirecting Input and Output <br>
Pipelines <br>
Job Control <br>
Working with Pathnames <br>
Pathname Expansion <br>
Quoting Special Characters <br>
How gsh Finds a Command </li>
</dir>
<p><b>Chapter 4 Built-in Commands </b></p>
<dir>
<li>Built-ins vs EXE Commands <br>
Shell Commands <br>
Kernel Commands <br>
Environment Commands </li>
</dir>
<p><b>Chapter 5 Shell Variables </b></p>
<dir>
<li>Using shell variables <br>
Scope <br>
Description of Pre-defined Shell Variables <br>
Accessing shell variables </li>
</dir>
<p><b>Appendix A Sample gsh session </b></p>
<p><b>Appendix B Prefix Conventions </b></p>
<p><b>Appendix C Errors </b></p>
<p><b>Appendix D Signals </b></p>
<p><b>Appendix E Non-Compliant Applications </b></p>
<p><b>Appendix F Termcaps </b></p>
<p><b>Glossary </b></p>
<p>&nbsp;</p>
<p><b>Index 63</b></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><font size="6" face="Times">Chapter 1</font></p>
<p><font size="6" face="Times">Getting started with the GNO Shell</font></p>
<p align="right"><font size="2" face="Times">&quot;Computer
operating systems are among the most complex objects created by
mankind...&quot;</font></p>
<p align="right"><font size="2" face="Times">Douglas Comer,
Operating System Design, The Xinu Approach</font></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><font face="Times"><b>Introduction</b></font></p>
<p>&nbsp;</p>
<p><font face="Times">The GNO shell is an integral part of the
GNO Multitasking Environment (GNO/ME). The GNO shell provides the
interface between the user and the GNO Kernel. While both work
together, the jobs they perform are quite different. This manual
documents the functions of the shell.</font></p>
<p><font face="Times">The user interacts with the shell through a
command-line interface. Command-line interfaces provide a unique
way of interacting with the operating system. Unlike GUIs
(Graphical User Interfaces), with which you are already familiar
with by using programs such as the Finder and ShrinkIt! GS, all
commands are typically entered using the keyboard. The shell
interprets commands and passes them to the kernel for control and
execution.</font></p>
<p><font face="Times">The command-line interface will be
unfamiliar to some people However, once the command-line
interface has been mastered, the user should have no difficulty
using any current or future GNO applications. Those of you
already familiar with Unix interfaces, such as the C shell,
Bourne shell, and Korn shell, or the ORCA shell on the Apple
IIGS, will begin to realize the advantages which GNO/ME is able
to provide.</font></p>
<p><font face="Times">The way this manual is presented allows the
complete beginner to simply work through the chapters in a
chronological prder. Chapter 2 familiarises the user with
entering basic commands whereas the more powerful GNO/ME features
are introduced in Chapter 3. Chapter 4 documents the commands
which are built into the GNO Shell and Chapter 5 explains shell
variables which give the user control over how thier installation
functions.</font></p>
<p>&nbsp;</p>
<p><font face="Times"><b>Customizing the Shell Environment</b></font></p>
<p><font face="Times">When <b>gsh</b>, the implimentation of the
GNO Shell, is executed, it reads in and processes the <i>gshrc</i>
file. This file contains start-up instructions for the shell,
which can be used to customize the operation of the shell and
other aspects of the system. It is created by the GNO Installer
during the installation process.</font></p>
<p><font face="Times">The following is a sample <i>gshrc</i> file
(line numbers have been added for convenience):</font></p>
<pre>
1 ###
2 #
3 # GNO 2.0 gshrc file
4 #
5 ###
6 #
7 # Initialize our environment
8 #
9 set path=&quot;:hard:gno:bin :hard:gno:usr:bin&quot;
10 set prompt=&quot;[%h] %S%t%s %C&gt; &quot;
11 set home=&quot;:hard:gno:user:root&quot;
12 set term=gnocon
13 export path prompt home term
14 setenv history=100 savehist=25
15 ###
16 #
17 #Set up standard prefixes for utilities.
18 #
19 ###
20 prefix 2 :software:orca:libraries
21 prefix 3 :software:orca
22 prefix 4 :software:orca:shell
23 prefix 5 :software:orca:languages
24 prefix 6 :software:orca:utilities
25 prefix 7 :tmp
26 ###
27 #
28 # Set up prefixes for Orca2.0(tm)'s benefit
29 #
30 ###
31 prefix 13 :software:orca:libraries
32 prefix 14 :software:orca
33 prefix 15 :software:orca:shell
34 prefix 16 :software:orca:languages
35 prefix 17 :software:orca:utilities
36 alias ls 'ls -CF'
37 alias dir 'ls -al'
38 alias cp 'cp -i'
39 alias rm 'cp -p rm'
40 alias mv 'cp -p mv'
41 setenv usrman='/usr/man'
42 set fignore='.a .root .sym'
43 alias zcat 'compress -cd'
44 setenv pager=less
45 setenv less=-e
46 set nonewline=1
47 #
48 # Move to home directory
49 #
50 cd line
</pre>
<p><font face="Times">When you install GNO/ME, the GNO installer
knows where to find the GNO utilities and any ORCA utilities you
may have. Unfortunately it does not know where all the other
utilities and applications that you may wish to use are located.
It is therefore necessary to edit the setup file in order to tell
the GNO shell where these programs are on your hard disk.</font></p>
<p><font face="Times">The setup file, <i>gshrc</i>, is located in
the /usr directory of the path where you installed GNO/ME. You
can use any text editor from the desktop to edit the <i>gshrc</i>
file, or if you are already familiar with the editor <b>vi</b>
you can use this utility after launching the GNO kernel.</font></p>
<p><font face="Times">Line 9 is the statement that we are
concerned with. <b>Hard </b>represents the name of your
particular hard drive volume where you have installed GNO/ME.</font></p>
<p><font size="2" face="Courier">set path=&quot;:hard:gno:bin
:hard:gno:usr:bin&quot; line #9</font></p>
<p><font face="Times">You will see that spaces have been inserted
between pathnames. The space is the pathname separator and the
colon has been used as the path delimiter for this specific
variable, PATH. As an exercise, add your system directory to this
statement. Line 9 should now look like this:</font></p>
<p><font size="2" face="Courier">set path=&quot;:hard:gno:bin
:hard:gno:usr:bin :hard:system&quot;</font></p>
<p><font face="Times">What you have just done allows the GNO
shell to find the <b>Finder</b> application. Now go ahead and add
any pathnames that hold utilities or applications that you will
use frequently from GNO/ME. It should also be noted that it is
possible to have more than one pathname containing EXE, SYS16, or
EXEC files; this is impossible under ORCA. The PATH variable is
discussed thoroughly in Chapter 5.</font></p>
<p><font face="Times">For now, the remaining lines of the <i>gshrc</i>
file do not need editing. As you gain an understanding of the
system you may wish to make further changes to the <i>gshrc</i>
file. Make sure you save the file before you exit the editor.</font></p>
<p><font face="Times">It is possible to modify these instructions
while the GNO shell is active, but any changes will be lost upon
exiting <b>gsh.</b> If you wish the changes to remain effective
for the next session you must add them to the <i>gshrc</i> file.</font></p>
<p><font face="Times">By customizing the <i>gshrc</i> file it is
possible to make the GNO environment more like U</font><font
size="2" face="Times">NIX, </font><font face="Times">the ORCA
environment, or something completly different. Customization of
the GNO environment leads to greater user productivity.</font></p>
<p>&nbsp;</p>
<p><font face="Times"><b>Invoking </b>.i.<b>gsh</b></font></p>
<p><font face="Times">GNO/ME can be launched from a program
launcher, such as the System 6.0 Finder. Launch the GNO Kernel
program, <b>kern</b> by double clicking on it. The GNO kernel
automatically executes the supplied GNO shell, <b>gsh</b>.</font></p>
<p><font face="Times">The prompt, &quot;<tt>[1] 2:00am root </tt></font><font
size="2" face="Courier"><tt>%</tt></font><font face="Times">&quot;,
indicates that <b>gsh</b> is ready to receive input from the
keyboard.</font></p>
<p><font face="Times">To start a new <b>gsh</b> from the
command-line simply type <b>gsh</b>. If multiple copies of the <b>gsh</b>
process are undesirable, use the command <b>source gsh</b>
instead. This is useful for testing changes made to the <i>gshrc</i>
file. <b>Source</b> is a built-in comand which is discussed in
Chapter 4 <b>Shell commands</b>.</font></p>
<p>&nbsp;</p>
<p><font size="6" face="Times">Chapter 2</font></p>
<p><font size="6" face="Times">Interacting with the GNO Shell</font></p>
<p>&nbsp;</p>
<p><font face="Times"><b>Executing Commands</b></font></p>
<p><font face="Times">A command consists of two parts: a name and
its arguments. The command name is the name used to start the
command. The name is usually the name of a file which can be
executed. The only exceptions are commands which are built-in to
the shell. These commands are documented in Chapter 4 <b>Built-In
Commands</b>. Any shell utility command with a filetype of EXE,
SYS16, or EXEC, can be executed in this fashion. The command name
must be separated from the command arguments with a space.</font></p>
<p><font face="Times">The command arguments are parameters that
the command takes as data to work with (In Applesoft BASIC,
&quot;</font><font size="2" face="Courier">HELLO WORLD</font><font
face="Times">&quot; would be an argument for the </font><font
size="2" face="Courier">PRINT</font><font face="Times"> command).
Command arguments are separated from each other with a space.
Note that although arguments extend the usefulness of a command,
not all commands have arguments. Any arguments entered after the
command will be passed by the shell to the program when it starts
exectuting. </font></p>
<p><font face="Times">The examples below use the following
commands:</font></p>
<p><font size="2" face="Courier"><b>qtime</b></font><font
face="Times"> displays time in English text.</font></p>
<p><font size="2" face="Courier"><b>echo</b></font><font
face="Times"> prints arguments to the screen.</font></p>
<p><font face="Times">Examples:</font></p>
<p><font size="2" face="Courier">% <b>qtime</b></font></p>
<p><font size="2" face="Courier">It's almost five.</font></p>
<p><font size="2" face="Courier">% <b>echo II Infinitum</b></font></p>
<p><font size="2" face="Courier">II Infinitum</font></p>
<p><font face="Times">At the simplest level the user enters
commands to the shell by typing them on the keyboard. <b>Gsh</b>
includes a command-line editor to help the user enter and edit
commands. The editor also provides a way to modify and execute
previous commands. Additionally the editor can help complete the
names of commands, filenames and variables.</font></p>
<p><font face="Times"><b></b></font>&nbsp;</p>
<p><font face="Times"><b>Command-line Editor</b></font></p>
<p><font face="Times">Below is a complete description of the
functions of the command-line editor with short examples
depicting how each editing key works.</font></p>
<p><font face="Times">Throughout the examples the underline
character, &quot;</font><font size="2" face="Courier">_</font><font
face="Times">&quot;, will be used to represent the current cursor
position. In addition, &quot;OA&quot; is used to represent the
Open Apple key and the term <i>word</i> is used to indicate a
string of characters consisting of only letters, digits, and
underscores. To the right of a editing key entry is the </font><font
size="2" face="Courier">bindkey</font><font size="2" face="Times">
</font><font face="Times">function name which is used to remap
editing functions to new keys. This information is included for
reference purposes only. See Chapter 4 <b>Shell Commands</b> for
more information on the </font><font size="2" face="Courier">bindkey</font><font
face="Times"> command.</font></p>
<p><font face="Times">It should be pointed out that at this stage
that the user should not be concerned with what the actual
commands used in the examples do, rather the user should
concentrate on how the command-line editor functions work.</font></p>
<p>&nbsp;</p>
<p><font face="Times"><b>Command Input</b></font></p>
<p><font size="2" face="Courier">These command-line editor keys
deal with entering text directly on the command-line.</font></p>
<p><font size="2" face="Courier">RETURN</font><font face="Times">
</font><font size="2" face="Courier"><b>newline</b></font></p>
<blockquote>
<p><font face="Times">The return key is used to terminate
line input. <b>gsh</b> then interprets the command on the
line and acts accordingly. The position of the cursor on the
command-line does not matter.</font></p>
<p><font size="2" face="Courier">Before</font></p>
<p><font size="2" face="Courier">% <b>echo f</b><b><u>o</u></b><b>o
bar</b> (RETURN)</font></p>
<p><font size="2" face="Courier">After</font></p>
<p><font size="2" face="Courier">foo bar</font></p>
<p><font size="2" face="Courier">% _</font></p>
</blockquote>
<p><font size="2" face="Courier">CTRL-D</font><font face="Times">
&lt;no bindkey name&gt;</font></p>
<blockquote>
<p><font face="Times">Exits <b>gsh</b> if it was the first
character typed on the command-line. If there are still jobs
running in the background or stopped, <b>gsh</b> will display
&quot;</font><font size="2" face="Courier">There are stopped
jobs.</font><font face="Times">&quot; If you press </font><font
size="2" face="Courier">CTRL-D</font><font face="Times"> a
second time without an intervening command, <b>gsh</b> will
terminate all the jobs in the job list and exit.</font></p>
</blockquote>
<p><font size="2" face="Courier">CTRL-R</font><font face="Times">
</font><font size="2" face="Courier"><b>redraw</b></font></p>
<blockquote>
<p><font face="Times">Moves to the next line and re-displays
the current command-line. Use this to redraw the current line
if the screen becomes garbled.</font></p>
</blockquote>
<p><font size="2" face="Courier">CTRL-L</font><font face="Times">
</font><font size="2" face="Courier"><b>clear-screen</b></font></p>
<blockquote>
<p><font face="Times">Clears the screen, moves the cursor to
the top line, and redraws the prompt and any command-line
that was in the process of being edited.</font></p>
</blockquote>
<p><font face="Times"><b>Command Editing</b></font></p>
<p><font size="2" face="Courier">These command-line editor keys
allow editing of the command-line text.</font></p>
<p><font size="2" face="Courier">CTRL-B <b>backward-char</b></font></p>
<blockquote>
<p><font size="2" face="Courier">LEFT-ARROW</font><font
face="Times"> Moves the cursor one character to the left. You
cannot move past the first character on the line. If so, <b>gsh</b>
will output an error beep.</font></p>
<p><font size="2" face="Courier">Before After</font></p>
<p><font size="2" face="Courier">% <b>print f</b><b><u>o</u></b><b>o
bar</b> (LEFT-ARROW) % <b>print </b><b><u>f</u></b><b>oo bar</b></font></p>
</blockquote>
<p><font size="2" face="Courier">CTRL-F <b>forward-char</b></font></p>
<p><font size="2" face="Courier">RIGHT-ARROW</font><font
face="Times"> Moves the cursor one character to the right. You
cannot move past the last character on the line. If so, <b>gsh</b>
will output an error beep.</font></p>
<p><font size="2" face="Courier">Before After</font></p>
<p><font size="2" face="Courier">% <b>print f</b><b><u>o</u></b><b>o
bar</b> (RIGHT-ARROW) % <b>print fo</b><b><u>o</u></b><b> bar</b></font></p>
<p><font size="2" face="Courier">DELETE</font><font face="Times">
</font><font size="2" face="Courier"><b>backward-delete-char</b></font></p>
<p><font face="Times">Deletes the character to the left of the
cursor. You can delete up to the first character on the
command-line.</font></p>
<p><font size="2" face="Courier">Before After</font></p>
<p><font size="2" face="Courier">% <b>print f</b><b><u>o</u></b><b>o
bar</b> (DELETE) % <b>print </b><b><u>o</u></b><b>o bar</b></font></p>
<p><font size="2" face="Courier">CLEAR <b>kill-whole-line</b></font></p>
<p><font size="2" face="Courier">CTRL-X</font><font face="Times">
Deletes all characters on the command line and positions the
cursor after the prompt.</font></p>
<p><font size="2" face="Courier">Before After</font></p>
<p><font size="2" face="Courier">% <b>prin</b><b><u>t</u></b><b>
foo bar</b> (CTRL-X) % <b>_</b> </font></p>
<p><font size="2" face="Courier">CTRL-Y;</font><font face="Times">
</font><font size="2" face="Courier"><b>kill-end-of-line</b></font></p>
<p><font face="Times">Deletes all characters from the cursor to
the end of the command-line.</font></p>
<p><font size="2" face="Courier">Before After</font></p>
<p><font size="2" face="Courier">% <b>print f</b><b><u>o</u></b><b>o
bar</b> (CTRL-Y) % <b>print f_</b> </font></p>
<p><font size="2" face="Courier">CTRL-D <b>delete-char</b></font></p>
<p><font size="2" face="Courier">OA-D</font><font face="Times">
Deletes the character under the cursor.</font></p>
<p><font size="2" face="Courier">Before After</font></p>
<p><font size="2" face="Courier">% <b>print fo</b><b><u>o</u></b><b>
bar</b> (OA-D) % <b>print fo</b><b><u> </u></b><b>bar</b></font></p>
<p><font size="2" face="Courier">CTRL-A <b>beginning-of-line</b></font></p>
<p><font size="2" face="Courier">OA-&lt;</font><font face="Times">
Moves the cursor to the beginning of the line.</font></p>
<p><font size="2" face="Courier">Before After</font></p>
<p><font size="2" face="Courier">% <b>print </b><b><u>f</u></b><b>oo
bar</b> (OA-&lt;) % <b><u>p</u></b><b>rint foo bar</b></font></p>
<p><font size="2" face="Courier">CTRL-E <b>end-of-line</b></font></p>
<p><font size="2" face="Courier">OA-&gt;</font><font face="Times">
Moves the cursor to the first position past the last character on
the line.</font></p>
<p><font size="2" face="Courier">Before After</font></p>
<p><font size="2" face="Courier">% <b>print </b><b><u>f</u></b><b>oo
bar</b> (OA-&gt;) % <b>print foo bar</b><b><u>_</u></b> </font></p>
<p><font size="2" face="Courier">OA-RIGHT-ARROW <b>forward-word</b></font></p>
<p><font face="Times">Moves the cursor right to the last
character of the current word.</font></p>
<p><font size="2" face="Courier">Before After</font></p>
<p><font size="2" face="Courier">% <b>print </b><b><u>f</u></b><b>oo
bar</b> (OA-RIGHT-ARROW) % <b>print fo</b><b><u>o</u></b><b> bar</b></font></p>
<p><font size="2" face="Courier">OA-LEFT ARROW <b>backward-word</b></font></p>
<p><font face="Times">Moves the cursor left to the beginning of
the current word.</font></p>
<p><font size="2" face="Courier">Before After</font></p>
<p><font size="2" face="Courier">% <b>print f</b><b><u>o</u></b><b>o
bar</b> (OA-LEFT ARROW) % <b>print </b><b><u>f</u></b><b>oo bar</b></font></p>
<p><font size="2" face="Courier">% <b>print foo </b><b><u>b</u></b><b>ar</b>
(OA-LEFT ARROW) % <b>print </b><b><u>f</u></b><b>oo bar</b></font></p>
<p><font size="2" face="Courier">OA-E</font><font face="Times"> </font><font
size="2" face="Courier"><b>toggle-cursor</b></font></p>
<p><font face="Times">Toggles input mode between insert and
overstrike. Overstrike mode is distinguished by a solid inverse
cursor and insert mode by a blinking '</font><font size="2"
face="Courier"><b>_</b></font><font face="Times">' cursor. In
overstrike mode, any characters that are typed directly
over-write those characters below the cursor. In insert mode, the
characters typed are inserted before the character below the
cursor.</font></p>
<p><font face="Times"><b>History Editing Keys</b></font></p>
<p><font face="Times">These command-line editor keys allow access
to previously entered commands. The GNO shell automatically keeps
track of previous commands in what is called a history buffer.</font></p>
<p><font face="Times">The maximum number of command-lines saved
in the history buffer is determined by the shell variable . A
default value for this variable is set in the <i>gshrc</i> file
that the GNO Installer creates. The lines saved to the history
buffer are kept between sessions. That is, when you exit <b>gsh</b>,
$</font><font size="2" face="Courier">SAVEHIST</font><font
face="Times"> command-lines are saved to the </font><font
size="2" face="Courier">history</font><font face="Times"> file in
your </font><font size="2" face="Courier">$HOME</font><font
face="Times"> directory. When <b>gsh</b> is invoked again, all
command-lines saved in the history buffer will be available using
history editing keys. See Chapter 5 <b>Description of Predefined
Shell Variables</b> for more informtation on the </font><font
size="2" face="Courier">HISTORY</font><font face="Times"> and </font><font
size="2" face="Courier">SAVEHIST</font><font face="Times">
variables.</font></p>
<dir>
<li><font size="2" face="Courier">CTRL-P <b>up-history</b></font><p><font
size="2" face="Courier">UP-ARROW</font><font face="Times">
Fetches the previous command-line. If the current
command-line is the first line in the history buffer, the
next line fetched will be an empty command-line. If
invoked again, the last line in the history buffer will
be displayed.</font></p>
<p><font size="2" face="Courier">Before After</font></p>
<p><font size="2" face="Courier">% <b>print foo bar</b></font></p>
<p><font size="2" face="Courier">% <b>echo Apple II</b></font></p>
<p><font size="2" face="Courier">% <b>echo GNO/ME</b></font></p>
<p><font size="2" face="Courier">% <b>_</b> (UP-ARROW) % <b>echo
GNO/ME_</b> </font></p>
<p><font size="2" face="Courier">% <b>echo GNO/ME_</b>
(UP-ARROW) % <b>echo Apple II_</b> </font></p>
<p><font size="2" face="Courier">CTRL-N <b>down-history</b></font></p>
<p><font size="2" face="Courier">DOWN-ARROW</font><font
face="Times"> Fetches the next command-line. If the
current command-line is the last command line in the
history buffer, the next line fetched will be the first
command-line in the history buffer.</font></p>
<p><font size="2" face="Courier">Before After</font></p>
<p><font size="2" face="Courier">% print foo bar</font></p>
<p><font size="2" face="Courier">% echo Apple II</font></p>
<p><font size="2" face="Courier">% echo GNO/ME</font></p>
<p><font size="2" face="Courier">% <b>_</b> (DOWN-ARROW)
% <b>print foo bar_</b> </font></p>
<p><font size="2" face="Courier">% <b>print foo bar_</b>
(DOWN-ARROW) % <b>echo Apple II_</b> </font></p>
<p><font face="Times"><b>Command, Filename and Variable
completion</b></font></p>
<p><font face="Times">These command-line editor keys can
be used to complete filenames, commands and variables.</font></p>
<p><font size="2" face="Courier">CTRL-D</font><font
face="Times"> </font><font size="2" face="Courier"><b>list-choices</b></font></p>
<p><font face="Times">Lists commands and pathnames that
match the current word.</font></p>
<p><font size="2" face="Courier">Before</font></p>
<p><font size="2" face="Courier">% <b>print foo_ bar</b>
(CTRL-D)</font></p>
<p><font size="2" face="Courier">After</font></p>
<p><font size="2" face="Courier">foo.c fool foo.m</font></p>
<p><font size="2" face="Courier">% <b>print foo_ bar</b></font></p>
<p><font size="2" face="Courier">TAB</font><font
face="Times"> </font><font size="2" face="Courier"><b>complete-word</b></font></p>
<p><font face="Times">Command, pathname and variable
completion. If the cursor is positioned on the first word
of the command-line, command pathname is performed, else
pathname or variable completion is performed. The word is
expanded to the closest matching command, pathname or
variable. Characters are appended up to the point that
they would cause more than one. If a complete pathname
results for pathname completion, <b>gsh</b> appends a
&quot;</font><font size="2" face="Courier">/</font><font
face="Times">&quot; if the pathname is a directory;
otherwise, it appends a space.</font></p>
<p><font size="2" face="Courier">Before After</font></p>
<p><font size="2" face="Courier">% <b>ca_</b> (TAB) % <b>cat_</b></font></p>
<p><font size="2" face="Courier">% <b>mo_ foo.c</b> (TAB)
% <b>more_ foo.c</b></font></p>
<p><font size="2" face="Courier">% <b>more fo_</b> (TAB)
% <b>more foo_</b> </font></p>
<p><font size="2" face="Courier">% <b>echo $TERMC_</b>
(TAB) % <b>echo $TERMCAP_</b></font></p>
<p><font face="Times">Note that if there is more than one
match for the partial command, <b>gsh</b> will sound a
beep on the speaker. You can use the CTRL-D (</font><font
size="2" face="Courier">list-choices</font><font
face="Times">) command to see the list of possible
matches, and should either finish entering the command
manually or type enough additional characters to
guarantee a unique match.</font></p>
<p><font face="Times">If the </font><font size="2"
face="Courier">$FIGNORE </font><font face="Times">variable
is set, <b>gsh</b> ignores filenames (when doing
completion) that end with any of the suffixes in </font><font
size="2" face="Courier">$FIGNORE</font><font face="Times">.
See Chapter 5 <b>Description of Pre-defined Shell
Variables</b> for more information regarding the </font><font
size="2" face="Courier">$FIGNORE </font><font
face="Times">variable.</font></p>
</li>
</dir>
<p><font face="Times"><b>Other ways of entering commands</b></font></p>
<p><font face="Times"><u>Terminal Input</u></font></p>
<p><font face="Times">An example involving the connection of a
terminal; will be dealt with in Chapter 3 <b>Redirecting Input
and Output</b> but it is necessary to mention here that when
using .i.<b>gsh</b> over a terminal, some keystrokes must be
slightly modified. This is because there are no terminals that
can transmit the OA key. Instead, a two-key sequence must be used
which replaces OA with ESC. For example, instead of pressing OA-E
to toggle insert mode, you can type ESC-E over a terminal to do
the same thing.</font></p>
<p><font face="Times">If you will be using terminals seriously
then you should install the Remote Access package.</font></p>
<dir>
<li><font face="Times"><u>Script File</u></font></li>
</dir>
<p><font face="Times">While you would normally type commands on
the command-line, you can also store a series of often used
commands in a file. A file containing such a series of commands
is called a script. A script is normally created by using a text
editor.</font></p>
<p><font face="Times">By typing the name of the script file, the
shell will execute it, line by line, as if you had typed each
command separately. The <i>gshrc</i> file presented in Chapter 1 <b>Customizing
the Shell Environment</b> is an example of a script file.</font></p>
</body>
</html>

1579
doc/refs.aug96/gsh.3.html Normal file

File diff suppressed because it is too large Load Diff

996
doc/refs.aug96/gsh.4.html Normal file
View File

@ -0,0 +1,996 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Microsoft FrontPage 2.0">
<title>GNO Shell User's Manual</title>
</head>
<body bgcolor="#FFFFFF">
<p><font size="6" face="Times">Chapter 4</font></p>
<p><font size="6" face="Times">Built-in Commands</font></p>
<p><font face="Times"></font>&nbsp;</p>
<p><font face="Times"></font>&nbsp;</p>
<p><font face="Times"></font>&nbsp;</p>
<p><font face="Times"><b>Built-ins vs EXE Commands</b></font></p>
<p><font face="Times"></font>&nbsp;</p>
<p><font face="Times">The term &quot;built-ins&quot; is used to
describe commands that exist within the shell itself. These
utilities run faster than external commands because the code is
already loaded into memory. Files of type &quot;EXE&quot;, on the
other hand, must be loaded into memory by <b>gsh</b> and
executed. If an EXE command is executed again, it might, again,
have to be loaded into memory. This results in longer execution
time for the program.</font></p>
<p><font face="Times"></font>&nbsp;</p>
<p><font face="Times"><b>gsh</b> has a number of built-in
commands which allow you to work with the shell, the GNO kernel,
and the shell environment.</font></p>
<p><font face="Times"></font>&nbsp;</p>
<p><font face="Times">The following section describes the
commands that are built-in to <b>gsh</b>. The &quot;[..]&quot;
character sequence represents an optional argument to a command.
The term &quot;</font><font size="2" face="Courier">SIGNAL</font><font
face="Times">&quot; is used to represent one of the signal names
or numbers listed in Appendix D <b>Signals</b>. The sequence
&quot;...&quot; means the command accepts multiple arguments of
the same type as the argument before the &quot;...&quot;
sequence. The sequence &quot;{..}&quot; is used to represent a
set, which is a list of possible arguments to choose from.</font></p>
<p><font face="Times"></font>&nbsp;</p>
<p><font face="Times"></font>&nbsp;</p>
<p><font face="Times"><b>Shell Commands</b></font></p>
<p><font face="Times"></font>&nbsp;</p>
<p><font face="Times">Shell built-ins provide support for
external shell commands (i.e. EXE files and shell scripts) and
provide some commands used in every-day work.</font></p>
<p><font face="Times"></font>&nbsp;</p>
<p><font size="2" face="Courier"><b>bindkey [-l] function string</b></font></p>
<p><font face="Times">Bindkey is used to customize the shell's
command-line editor. Any key on the keyboard can be mapped to any
of a number of functions. The various functions are as follows:</font></p>
<dir>
<li><font size="2" face="Courier">backward-char</font><font
face="Times"> move cursor left</font><p><font size="2"
face="Courier">backward-delete-char</font><font
face="Times"> delete character to left</font></p>
<p><font size="2" face="Courier">backward-word</font><font
face="Times"> move cursor left one word</font></p>
<p><font size="2" face="Courier">beginning-of-line</font><font
face="Times"> move cursor to beginning of line</font></p>
<p><font size="2" face="Courier">clear-screen</font><font
face="Times"> clear screen and redraw prompt</font></p>
<p><font size="2" face="Courier">complete-word</font><font
face="Times"> perform filename completion</font></p>
<p><font size="2" face="Courier">delete-char</font><font
face="Times"> delete character under cursor</font></p>
<p><font size="2" face="Courier">down-history</font><font
face="Times"> replace command line with next history</font></p>
<p><font size="2" face="Courier">end-of-line</font><font
face="Times"> move cursor to end of line</font></p>
<p><font size="2" face="Courier">forward-char</font><font
face="Times"> move cursor to the right</font></p>
<p><font size="2" face="Courier">forward-word</font><font
face="Times"> move cursor one word to the right</font></p>
<p><font size="2" face="Courier">kill-end-of-line</font><font
face="Times"> delete line from cursor to end of line</font></p>
<p><font size="2" face="Courier">kill-whole-line</font><font
face="Times"> delete the entire command line</font></p>
<p><font size="2" face="Courier">list-choices</font><font
face="Times"> list file completion matches</font></p>
<p><font size="2" face="Courier">newline</font><font
face="Times"> finished editing, accept command line</font></p>
<p><font size="2" face="Courier">raw-char</font><font
face="Times"> character as-is</font></p>
<p><font size="2" face="Courier">redisplay</font><font
face="Times"> redisplay the command line</font></p>
<p><font size="2" face="Courier">toggle-cursor</font><font
face="Times"> toggle between insert and overwrite cursor</font></p>
<p><font size="2" face="Courier">undefined-char</font><font
face="Times"> this key does nothing</font></p>
<p><font size="2" face="Courier">up-history</font><font
face="Times"> replace command line with previous history</font></p>
</li>
</dir>
<p><font face="Times">Keys are bound to functions, not
vice-versa. This means that you can have any number of commands
refer to the same function. For example, the default bindings
have </font><font size="2" face="Courier">CTRL-A</font><font
face="Times"> and </font><font size="2" face="Courier">OA-&lt;</font><font
face="Times"> both bound to </font><font size="2" face="Courier">beginning-of-line</font><font
face="Times">.</font></p>
<p><font face="Times"></font>&nbsp;</p>
<p><font face="Times">Most of the function names are
self-explanatory, and are explained in Chapter 2, but a few
deserve discussion. </font><font size="2" face="Courier">raw-char</font><font
face="Times"> is what you should bind a key that should be
inserted into the command-line as-is. The regular printable ASCII
set, such as the letters a-z, numbers, etc. are bound to </font><font
size="2" face="Courier">raw-char</font><font face="Times">.
Control characters should not be bound to </font><font size="2"
face="Courier">raw-char</font><font face="Times"> because the
command-line editor will become confused (most control characters
act as special GNO/ME console feature codes - see the <i>GNO
Kernel Reference Manual</i>, Chapter 4 <b>TextTools Replacement</b>).</font></p>
<p><font face="Times"></font>&nbsp;</p>
<p><font face="Times">Any keystroke that should be rejected by
the editor should be bound to </font><font size="2"
face="Courier">undefined-char</font><font face="Times">. By
default, this includes control characters and OA-sequences that
are not assigned to any editing features. Any key bound to </font><font
size="2" face="Courier">undefined-char</font><font face="Times">
will cause <b>gsh</b> to beep and ignore the key.</font></p>
<p><font face="Times"></font>&nbsp;</p>
<p><font face="Times">You can actually bind key sequences, not
just keystrokes, to functions. There is no limit other than
memory to how many characters are in a command sequence.</font></p>
<p><font face="Times"></font>&nbsp;</p>
<p><font face="Times">Because terminals do not have the OA (Open
Apple) key, ; is actually mapped by the kernel to a two-character
sequence consisting of </font><font size="2" face="Courier">ESC</font><font
face="Times"> and the key. For example, OA-Y would actually
produce </font><font size="2" face="Courier">ESC-Y</font><font
face="Times">.</font></p>
<p><font face="Times"></font>&nbsp;</p>
<p><font face="Times">Control characters in the </font><font
size="2" face="Courier"><b>string</b></font><font face="Times">
are represented in ^X format; e.g. CTRL-A is represented by ^A.
ESC (and OA) is represented by ^[.</font></p>
<p><font face="Times"></font>&nbsp;</p>
<p><font face="Times">Examples:</font></p>
<p><font size="2" face="Courier">% <b>bindkey kill-end-of-line ^K</b></font><font
face="Times"> map CTRL-K to kill-end-of-line (like Emacs)</font></p>
<p><font size="2" face="Courier">% <b>bindkey clear-screen ^[^X</b></font><font
face="Times"> map OA-CLEAR to clear-screen</font></p>
<p><font face="Times"></font>&nbsp;</p>
<p><font size="2" face="Courier"><b>commands</b></font></p>
<p><font face="Times">Displays a list of all built-in shell
commands.</font></p>
<p><font face="Times"></font>&nbsp;</p>
<p><font size="2" face="Courier"><b>cd [pathname]</b></font></p>
<p><font size="2" face="Courier"><b>chdir [pathname]</b></font></p>
<p><font face="Times">Changes the current working directory to
pathname. If </font><font size="2" face="Courier">pathname</font><font
face="Times"> is not given, the default </font><font size="2"
face="Courier">HOME</font><font face="Times"> directory (i.e. the
value of the </font><font size="2" face="Courier">HOME</font><font
face="Times"> environment variable) is used. This makes it easy
to move back to your home directory. Under <b>gsh</b>, unlike
most U</font><font size="2" face="Times">NIX</font><font
face="Times"> shells, the cd is not necessary, except to change
automatically to your HOME directory. If a command is not a
built-in or EXE file, but is instead the name of a directory, a
cd is implied and performed on the directory unless the </font><font
size="2" face="Courier">NODIREXEC</font><font face="Times">
variable has been set.</font></p>
<p><font face="Times"></font>&nbsp;</p>
<p><font size="2" face="Courier">[1] gno&gt; <b>cd utilities</b></font></p>
<p><font size="2" face="Courier">[2] gno/utilities&gt; <b>echo
$HOME</b></font></p>
<p><font size="2" face="Courier">/dev/gno</font></p>
<p><font size="2" face="Courier">[3] gno/utilities&gt; <b>cd</b></font></p>
<p><font size="2" face="Courier">[4] gno&gt; <b>utilities</b></font></p>
<p><font size="2" face="Courier">[5] gno/utilities&gt; <b>../utilities</b></font></p>
<p><font size="2" face="Courier">[6] gno/utilities&gt; <b>~</b></font></p>
<p><font size="2" face="Courier">[7] gno&gt; _</font></p>
<p><font face="Times"></font>&nbsp;</p>
<p><font size="2" face="Courier"><b>clear</b></font></p>
<p><font face="Times">This command takes no arguments. When
invoked, the screen will be cleared.</font></p>
<p><font face="Times"></font>&nbsp;</p>
<p><font size="2" face="Courier"><b>df</b></font></p>
<p><font face="Times">This command takes no arguments. When
invoked, a listing of free blocks for every block device is
given. In addition, the device name, type, file system, and
capacity is listed.</font></p>
<p><font face="Times"></font>&nbsp;</p>
<p><font size="2" face="Courier">[1] gno&gt; <b>df</b></font></p>
<p><font size="2" face="Courier"></font>&nbsp;</p>
<p><font size="2" face="Courier">.d## Volume Device Free Total
Capacity System</font></p>
<p><font size="2" face="Courier">---- ----------------
---------------- ------- ------- -------- -----------</font></p>
<p><font size="2" face="Courier">.d1 :Procyon .CVTECH.S6.A 3166
41037 92% ProDOS</font></p>
<p><font size="2" face="Courier">.d2 Apple 3.5 Drive
.APPLEDISK3.5A </font></p>
<p><font size="2" face="Courier">.d3 Apple 3.5 Drive
.APPLEDISK3.5B </font></p>
<p><font size="2" face="Courier">.d4 Console Driver .CONSOLE </font></p>
<p><font size="2" face="Courier">.d5 :Day .CVTECH.S6.B 15881
65535 75% ProDOS</font></p>
<p><font size="2" face="Courier">.d6 :Night .CVTECH.S6.C 39274
65535 40% HFS</font></p>
<p><font size="2" face="Courier">.d7 :Left .CVTECH.S6.D 5365
51776 89% ProDOS</font></p>
<p><font size="2" face="Courier">.d8 :Right .CVTECH.S6.E 27477
65535 58% ProDOS</font></p>
<p><font size="2" face="Courier">.d9 :Software .CVTECH.S6.F 3289
40960 91% ProDOS</font></p>
<p><font size="2" face="Courier">.d10 :RAM5 .RAMDISK 505 512 1%
ProDOS</font></p>
<p><font size="2" face="Courier">.d11 :Conner 40 .AFP1 7368 80604
90% AppleShare</font></p>
<p><font size="2" face="Courier">.d12 AppleTalk fsd .AFP2 </font></p>
<p><font size="2" face="Courier">....</font></p>
<p><font size="2" face="Courier">.d24 AppleTalk fsd .AFP14 </font></p>
<p><font size="2" face="Courier">.d25 AppleTalk RPM .RPM </font></p>
<p><font size="2" face="Courier">.d26 AppleTalk Main .APPLETALK </font></p>
<p><font size="2" face="Courier">.d27 Serial Modem .SERIAL2 </font></p>
<p><font size="2" face="Courier">.d28 :system .APPLESCSI.HD01.
27561 50773 45% ProDOS</font></p>
<p><font size="2" face="Courier">.d29 :dev .APPLESCSI.HD01. 43431
65108 33% ProDOS</font></p>
<p><font size="2" face="Courier">.d30 :usr .APPLESCSI.HD01. 44376
48725 8% ProDOS</font></p>
<p><font face="Times"></font>&nbsp;</p>
<p><font size="2" face="Courier">Volume</font><font face="Times">
- Name of device.</font></p>
<p><font size="2" face="Courier">Device</font><font face="Times">
- GS/OS device name.</font></p>
<p><font size="2" face="Courier">Free</font><font face="Times"> -
Total number of free blocks on device.</font></p>
<p><font size="2" face="Courier">Total</font><font face="Times">
- Total number of blocks on device.</font></p>
<p><font size="2" face="Courier">Capacity</font><font
face="Times"> - Percentage of used blocks on device.</font></p>
<p><font size="2" face="Courier">System</font><font face="Times">
- Format of file system. With System Software 6.0.1, the file
systems available are ProDOS, HFS, Pascal, MS-DOS, and DOS 3.3,
and some CD-ROM formats.</font></p>
<p><font face="Times"></font>&nbsp;</p>
<p><font size="2" face="Courier"><b>echo [-n] arg [arg ...]</b></font></p>
<p><font face="Times">Expands the &quot;</font><font size="2"
face="Courier">arg</font><font face="Times">&quot; expression(s)
and outputs them to the screen. If the &quot;</font><font
size="2" face="Courier">-n</font><font face="Times">&quot; switch
is specified, a </font><font size="2" face="Courier">NEWLINE</font><font
face="Times"> character is not output after the last &quot;</font><font
size="2" face="Courier">arg</font><font face="Times">&quot;
expression. Special escape sequences may also be included in the
arguments, similar to those used in C strings:</font></p>
<p><font size="2" face="Courier">\b</font><font face="Times"> -
Backspace</font></p>
<p><font size="2" face="Courier">\f</font><font face="Times"> -
Clears screen (form feed)</font></p>
<p><font size="2" face="Courier">\n</font><font face="Times"> -
Newline</font></p>
<p><font size="2" face="Courier">\r</font><font face="Times"> -
Return</font></p>
<p><font size="2" face="Courier">\t</font><font face="Times"> -
Tab</font></p>
<p><font size="2" face="Courier">\nnn</font><font face="Times"> -
A decimal ASCII code. nnn represents the ASCII code.</font></p>
<p><font face="Times"></font>&nbsp;</p>
<p><font size="2" face="Courier">[1] gno&gt; <b>echo Hello World</b></font></p>
<p><font size="2" face="Courier">Hello World</font></p>
<p><font size="2" face="Courier">[2] gno&gt; <b>echo -n Hello
World</b></font></p>
<p><font size="2" face="Courier">Hello World[3] gno&gt; <b>echo
$PATH $HOME 'come get to $gnome'</b></font></p>
<p><font size="2" face="Courier">/dev/gno/utilities
/dev/orca/utilities /dev/gno come get to $gnome</font></p>
<p><font face="Times"></font>&nbsp;</p>
<p><font size="2" face="Courier"><b>exit</b></font></p>
<p><font face="Times">Exits the shell or terminates a shell
script.</font></p>
<p><font face="Times"></font>&nbsp;</p>
<p><font size="2" face="Courier"><b>history</b></font></p>
<p><font face="Times">This command displays the list of previous
command-line entries. The number of entries saved is set in the </font><font
size="2" face="Courier">$HISTORY</font><font face="Times">
variable.</font></p>
<p><font face="Times"></font>&nbsp;</p>
<p><font face="Times"><b>pushd</b></font></p>
<p><font face="Times"><b>popd [+n]</b></font></p>
<p><font face="Times"><b>dirs</b></font></p>
<p><font face="Times"></font>&nbsp;</p>
<p><font face="Times">These three commands maintain the shell's <i>directory
stack.</i> Let's say you're working in a directory
/src/myprogs/class/program.1/, and you want to temporarily go to
another directory. Instead of having to 'cd' there and 'cd' back
to a very long directory name (i.e., lots of typing), you can use
the pushd command, like so:</font></p>
<p><font face="Times"></font>&nbsp;</p>
<p><font size="2" face="Courier">gsh&gt; <b>pushd /etc</b> </font><font
size="2" face="Times">{ start in /src/myprogs/class/program.1/ }</font></p>
<p><font size="2" face="Courier">...</font></p>
<p><font size="2" face="Courier">gsh&gt; <b>popd</b> </font><font
size="2" face="Times">{ back in /src/myprogs/class/program.1/ }</font></p>
<p><font face="Times"></font>&nbsp;</p>
<p><font face="Times">The </font><font size="2" face="Courier">pushd</font><font
face="Times"> command stores the current directory on a stack,
and then changes the current directory to the argument. When you
want to go back to the original directory, type popd. The shell
will pull the last directory off the stack and 'cd' to that
directory.</font></p>
<p><font face="Times"></font>&nbsp;</p>
<p><font face="Times">The </font><font size="2" face="Courier">popd
</font><font face="Times">command when given an argument of +n
will remove the n'th directory from the stack. It does not change
to that directory.</font></p>
<p><font face="Times"></font>&nbsp;</p>
<p><font face="Times">The </font><font size="2" face="Courier">dirs
</font><font face="Times">command displays the current directory
stack.</font></p>
<p><font face="Times"></font>&nbsp;</p>
<p><font size="2" face="Courier"><b>pwd</b></font></p>
<p><font face="Times">Displays the current working directory.
This is useful if you have not configured the </font><font
size="2" face="Courier">$PROMPT</font><font face="Times"> string
to output your current working directory.</font></p>
<p><font face="Times"></font>&nbsp;</p>
<p><font size="2" face="Courier">[1]&gt; <b>cd $HOME</b></font></p>
<p><font size="2" face="Courier">[2]&gt; <b>pwd</b></font></p>
<p><font size="2" face="Courier">/user/root</font></p>
<p><font size="2" face="Courier">[3]&gt; <b>cd utilities</b></font></p>
<p><font size="2" face="Courier">[4]&gt; <b>pwd</b></font></p>
<p><font size="2" face="Courier">/user/root/utilities</font></p>
<p><font face="Times"></font>&nbsp;</p>
<p><font size="2" face="Courier"><b>source</b></font></p>
<p><font face="Times">When a script is executed, <b>gsh</b>
creates a new process to run the script. As a result, scripts
cannot change the shell's prefixes and certain other parameters.
Instead of executing the script directly, you may use the </font><font
size="2" face="Courier">source</font><font face="Times"> command
which does not create a new process to execute the script. Thus,
the </font><font size="2" face="Courier">source</font><font
face="Times"> command is effectively exactly like typing all the
commands in the script from the keyboard.</font></p>
<p><font face="Times"></font>&nbsp;</p>
<p><font face="Times"></font>&nbsp;</p>
<p><font size="2" face="Courier"><b>tset</b></font></p>
<p><font face="Times">The </font><font size="2" face="Courier">tset</font><font
face="Times"> command causes the shell to reread the </font><font
size="2" face="Courier">/etc/termcap</font><font face="Times">
file and reset its output system to use the terminal type
specified in the $TERM variable. On startup, after reading the </font><font
size="2" face="Courier">gshrc</font><font face="Times"> file, <b>gsh</b>
automatically does a </font><font size="2" face="Courier">tset</font><font
face="Times">. <b>gsh</b> also automatically does a tset whenever
the </font><font size="2" face="Courier">$TERM</font><font
face="Times"> variable is changed with the </font><font size="2"
face="Courier">set</font><font face="Times"> command. You would
use tset manually if, for example, a utility changed the value of
</font><font size="2" face="Courier">$TERM</font><font
face="Times">.</font></p>
<p><font face="Times"></font>&nbsp;</p>
<p><font size="2" face="Courier"><b>which command_name
[command_name ...]</b></font></p>
<p><font face="Times">Let's say that you are working on a new
version of the venerable shell utility </font><font size="2"
face="Courier">ls</font><font face="Times">. Since a search of
the hash table is done before searching the current directory,
you might accidentally be using the wrong version of the command.
You make changes and run the new program, but your changes don't
seem to appear! Use the </font><font size="2" face="Courier">which</font><font
face="Times"> command to check your sanity. Which also comes in
handy in locating duplicate program names in the </font><font
size="2" face="Courier">$PATH</font><font face="Times">
directories (for example, an </font><font size="2" face="Courier">ls</font><font
face="Times"> in both </font><font size="2" face="Courier">/bin</font><font
face="Times"> and </font><font size="2" face="Courier">/usr/bin</font><font
face="Times">.)</font></p>
<p><font face="Times"></font>&nbsp;</p>
<p><font face="Times">The way to access a utility in the current
directory which has the same name as a program in the </font><font
size="2" face="Courier">$PATH</font><font face="Times"> is to
prefix the command name with '</font><font size="2"
face="Courier">.</font><font face="Times">', as in &quot;</font><font
size="2" face="Courier">./ls</font><font face="Times">&quot;.
Also, see </font><font size="2" face="Courier">unhash</font><font
face="Times">.</font></p>
<p><font face="Times"></font>&nbsp;</p>
<p><font face="Times"><b></b></font>&nbsp;</p>
<p><font face="Times"><b>Kernel Commands</b></font></p>
<p><font face="Times"></font>&nbsp;</p>
<p><font face="Times"><b>gsh</b> provides a set of commands to
control the GNO kernel. These commands mainly deal with job
control. See Chapter 3 <b>Job Control</b>.</font></p>
<p><font face="Times"></font>&nbsp;</p>
<p><font size="2" face="Courier"><b>bg { %job | pid }</b></font></p>
<p><font face="Times">Starts the specified job, if stopped, and
places it in the background.</font></p>
<p><font face="Times"></font>&nbsp;</p>
<p><font size="2" face="Courier"><b>fg { %job | pid }</b></font></p>
<p><font face="Times">Starts the specified job, if stopped, and
brings it into the foreground.</font></p>
<p><font face="Times"></font>&nbsp;</p>
<p><font size="2" face="Courier"><b>jobs [-l]</b></font></p>
<p><font face="Times">Displays a list of the shell's jobs. If the
&quot;</font><font size="2" face="Courier">-l</font><font
face="Times">&quot; switch is specified, the process id is
included in the job list.</font></p>
<p><font face="Times"></font>&nbsp;</p>
<p><font size="2" face="Courier">[1] gno&gt; <b>cmpl foo.c
keep=foo &amp;</b></font></p>
<p><font size="2" face="Courier">[1] + Running cmpl foo.c
keep=foo &amp;</font></p>
<p><font size="2" face="Courier">[2] gno&gt; <b>echo hello</b></font></p>
<p><font size="2" face="Courier">hello</font></p>
<p><font size="2" face="Courier">[3] gno&gt; <b>jobs</b></font></p>
<p><font size="2" face="Courier">[1] + Running cmpl foo.c
keep=foo &amp;</font></p>
<p><font face="Times"></font>&nbsp;</p>
<p><font size="2" face="Courier"><b>kill {[-SIGNAL] %job | pid |
[-l]</b></font></p>
<p><font face="Times">The kill command will send the signal </font><font
size="2" face="Courier">SIGNAL<