Previous | Table of Contents | Next |
Most man pages include all the sections given in Table 2.1 and might include one or two optional sections described in Table 2.2.
Section | Description |
---|---|
AVAILABILITY | This section describes the versions of UNIX that include support for a given command. Sometimes it lists the optional software packages you need to purchase from the vendor to gain extra functionality from a command. |
KNOWN BUGS | This section usually lists one or more known problems with a command. If you encounter a problem that is not included in this section, you should report it to your UNIX vendor. |
FILES | This section lists the files that are required for a command to function correctly. It might also list the files that can be used to configure a command. |
AUTHORS or CONTACTS | These sections list the commands authors or provide some contact information regarding a command. |
STANDARDS COMPLIANCE | Some commands have behavior that is specified by a standards organization such as ISO (International Standards Organization), IEEE (Institute of Electrical and Electronic Engineers), or ANSI (American National Standards Institute). This section lists the standards with which a particular command complies. |
Try using the man command to get more information on some of the commands I have discussed in this chapter.
If the man command cannot find a man page corresponding to the command you requested, it issues an error message. For example, the command
$ man apple
produces an error message similar to the following on my system:
No manual entry for apple
The exact error message depends on your version of UNIX.
The term manual page comes from the original versions of UNIX, when the online pages were available as large bound manuals. In all, there were eight different manuals covering the main topics of the UNIX system. These manuals are described in Table 2.3.
Manual Section | Description |
---|---|
1 | Covers commands. |
2 | Covers UNIX system calls. System calls are used inside a program, such as date, to ask the kernel for a service. |
3 | Covers libraries. Libraries are used to store nonkernel-related functions used by C programmers. |
4 | Covers file formats. This manual specifies the format of files such as /etc/passwd. |
5 | Also covers file formats. |
6 | Includes the instructions for playing the games that came with UNIX. |
7 | Covers device drivers. |
8 | Covers system maintenance. |
Unlike the printed version, where you had to know the section where you needed to look for a particular manual page, the man command looks in all the sections for the information you requested. This makes it much easier to get help using the man pages.
In this chapter, I explained in greater detail what the shell is and how it works. You saw how the login process works and what the login command does to start a shell. From this you were able to look at the two modes in which the shell can be run:
In shell programming, the noninteractive use of the shell should interest you the most. This mode enables you to specify commands inside a file and then have the shell execute the commands within that file. You also saw how to make a file containing commands executable. This enables you to treat shell scripts as new commands.
You also looked at some details of shell initialization and getting help using the man command.
The next chapter formally introduces the concept of files by showing you how to list files, view the contents of files, and manipulate files.
#!/bin/sh serve in a script?
Previous | Table of Contents | Next |