
Figure 1. A computer system is composed of
layers of hardware and software
+----------------+-------------------------------------------------+
| | |
| Shell | Application Programs |
| | |
|----------------+-------------------------------------------------+
| |
| Operating Sytem Kernel |
| |
+------------------------------------------------------------------+
| |
| Hardware |
| (CPU, Memory, and Peripheral Devices) |
| |
+------------------------------------------------------------------+
Listing 1. Resetting the shell prompt
A. Reset the Bourne shell prompt by
changing the PS1 shell variable:
$ PS1 = "Yes, Master? "
Yes, Master? []
B. Reset the C shell by resetting the
prompt variable:
$ set prompt = Yes, Master? "
Yes, Master? []
Listing 2. A general format for a UNIX system
command
$ command_name [ option... ] [ filename... ]
Listing 3. Some Bourne shell error
messages
A. Mistype a command name:
$ pws
pws: not found
$ []
B. Attempt to run a restricted command:
$ /etc/shutdown
/etc/shutdown: cannot execute
$ []
Listing 4. Equivalent C shell error
messages
A. Mistype a command name:
% pws
pws: Command not found.
% []
B. Attempt to run a restricted command:
% /etc/shutdown
/etc/shutdown: Permission denied.
% []
Listing 5. Use the &
directive to run a command in the background.
$ nroff -mm text.mm >text.fmt &
|