| Textbook Errata - UNIX Shell Programming | |
| Pg 7 pp 2 |
The 14 character limit for filenames was for older systems that used the SVFS filesystem. Today's modern systems all have much greater limits, typically in the 1024 character range for the entire pathname. See man limits. |
| Pg 20 Line -9 |
The command $ cp ../programs/collect should be $ cp ../programs/collect . |
| Pg 37 pp 2 |
The last line of paragraph 2 "If the command..." only applies to shells with no job control such as sh. In shells with job control, the process will be stopped with a SIGTTIN signal, allowing the user to foreground the job and supply input. |
| Pg 45 pp 1 |
The statement "the shell searches the disk" is not quite accurate. The shell does not search the disk, which would be too slow, and would hinder performance of other processes running on the system. Rather, the shell uses the PATH variable to locate commands - only directories listed in PATH are used to execute a command. The shell attempts to execute the command using a full pathname. For each of the paths listed in the PATH variable, the shell prepends that rooted path to the command name, and attempts to execute that command. |
| Pg 49 pp 2 |
Same corrections as page 45 above. |
| Pg 86-87 Line -8 |
The file phone_book should be phonebook (without the underscore). Same correction on page 87, line 3. |
| Pg 105 Line 1,6,9,11 |
Replace the command inside the run script tbl sys.caps | nroff -mm -Tlp | lp with the simpler command echo Hello World The tbl and nroff commands are a bit dated, and are not used much anymore. The lp comamnd is also removed because when testing out these examples, you should not be printing output remotely to some unknown printer. All references to these commands should be removed from this section, and future sections. Page 137 and 191 refer again to this command sequence and the appropriate replacements should be made there as well. |
| Pg 106 Line -10 |
The author mentions that the # character is the default erase character. This is no longer true, and has not been for a long time. The delete or backspace key is typically set to be the erase character. |
| Pg 106 Line 8 |
The echo command with no arguments does not skip a line. More accurately, it just outputs a blank line (a carriage return). |
| Pg 108 Line -14 |
The author says the echo command is used to display the value of a variable. This is not very accurate, because in fact, echo knows nothing about variables. As indicated later at the bottom of the page, the shell actually replaces the variable (called variable substitution) with its contents before echo is run. Thus, echo only sees the contents of the variable - which is just a series of characters. Additionally, there are many commands that can be used to perform output; echois just one of them. |
| Pg 130 Line 2 |
The command $ echo "$names" should be $ echo "$namelist" This would output the list of names from the file names that was just placed into the variable namelist in the previous back quoted variable assignment. |
| Pg 131 Line -9 |
The textbook says that the shell has "no concept of performing arithmetic on values stored inside variables". This is definitely true for the Bourne shell. And for the original version of ksh, this is also correct. However, with the more recent 1988 version of ksh, this is no longer true. This version of the shell knows how to perform arithmetic. |
| Pg 137,138 Line many |
Perform the same replacements as those suggested for page 105. |
| Pg 145 Line -3, -7 |
The S* should be $*. This typo exists on two lines in the tshift program. |
| Pg 190-192 Line many |
Perform the same replacements as those suggested for page 105. |
| Pg 197 Line -2 |
Make sure if you try the example on program first shown in Chapter 8 that you execute it with relative pathname ./on. Since the time the book was written, a system program called on is distributed with Solaris UNIX systems. You will likely end up running that program instead if you do not specify a path to your own version of the example on script. |
| Pg 245 Line -8 |
The command to run should be vartest4 not vartest5. |
| Pg 260 Line 9 |
The PATH variable shown in program db should be PATH=$PATH:$BIN not PATH=$PATH$BIN. A colon is the PATH component separator. |
| Pg 261 Line -2 |
The last RPTS variable shown in the Figure 11-8 should be /usr2/data/rpts not /usr2/data/plus. |
| Pg 304 Line -4 |
The closing double quote is missing from the line: echo "cat >$file <<\THE-END-OF-DATA The corrected line is: echo "cat >$file <<\THE-END-OF-DATA" . |
Textbook ErrataWed, Jan 22 2003, 8:51pm
This page contains corrections to the text book(s).
The errata below describes
the page of the error, and either the paragraph number, or line number
containing the error.
Negative lines numbers count from the bottom of the page.
Blank lines are not counted.
As you find additional errors or omissions not listed here, please let me know
and I'll add them to the list.



