Errata

UNIX  PowerTools

Errata for UNIX PowerTools

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".

The following errata were submitted by our customers and approved as valid errors by the author or editor.

Color key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted By Date submitted Date corrected
Printed
Page xxxviii
The sentence before the list changed to

Here's a list of authors, their initials, and the articles they wrote
or contributed to:

Anonymous    Jan 01, 1998
Printed
Page xxxix
The following names were added to the page

CY Chuck Yerkes 13.15

EM Evan L. Marcus 13.15

Anonymous    Apr 01, 1999
Printed
Page 83

The text used to read:

"stty eraseZ"

It now reads:

"stty erase Z"

Anonymous    Jun 01, 2000
Printed
Page 95
last sentence

"A lot of 'oddball' time zones are included: for example, the state
of Indiana, for which large parts observe Daylight Saving Time ..."

changed to

"A lot of 'oddball' time zones are included: for example, the state
of Indiana, which large parts of which don't observe Daylight Saving
Time ..."

Anonymous    Oct 01, 1998
Printed
Page 109
in footnote, changed "$tcsh" to "$?tcsh"

Anonymous    Oct 01, 1997
Printed
Page 142-144
table 8-3 revised

Anonymous    Jan 01, 1998
Printed
Page 142
middle of the right column of the table

"See " has been deleted

Anonymous    Aug 01, 1999
Printed
Page 206
Korn shell emacs mode line editing commands

CTRL-z is now CTRL-a

Anonymous    Jan 01, 1999
Printed
Page 209
article 11.15: in the .Ps/.Pe section, changed

% #file#data

to

% #file#data#

Anonymous    Jan 01, 1998
Printed
Page 214

The first paragraph has been changed to now read:

You don't need to look up the job number to select a job, though.
Instead, you can specify a job by name. Simply use the first
letter(s) of the command name--enough to be unambiguous--after the
percent sign. For example, the commands above could have been
issued as:

% kill %n
% fg %vi

Also, the line after the second code example that read:

"to kill the nroff job shown in the example above"

has been deleted.

And, the last paragraph in the article, used to read:

You can put a stopped job into the background in a similar way.
For example:

% %2 &

will put job number 2 into the background.

It now reads:

You can put a stopped job into the background in a similar way.
For example, to put job number 2 into the background, add an
ampersand:

% %2 &

Anonymous    Apr 01, 1999
Printed
Page 216

The last line of code, on the right hand side read:

...bash

The line now reads:

...bash, ksh

Anonymous    Apr 01, 1999
Printed
Page 223

The next-to-last paragraph, from the second line on read:

Here's how to run your cruncher program, route the stderr through
a pipe to the mail program, and leave stdout going to your screen:

It now reads:

Here's how to run your cruncher program, route the stderr through
a pipe to the mail program, and leave the stdout going wherever it
was going (in this case, to your screen):

Anonymous    Apr 01, 1999
Printed
Page 226
in the last block of code, made the code after the prompts bold

Anonymous    Jan 01, 1998
Printed
Page 226
All lines in the second column in the middle of the page now line

up underneath each other.

Anonymous    Apr 01, 1999
Printed
Page 228-229
re-broke the page so that the blank line in the code is not

at the end of p. 228

Anonymous    Oct 01, 1997
Printed
Page 243

The text used to read:

"csh and bash have pushd and popd commands make this a lot easier."

It now reads:

"csh and bash have pushd and popd commands to make this a lot easier."

Anonymous    Jun 01, 2000
Printed
Page 255
sixth paragraph, the one labeled !(abc)

changed:

"doesn't match xabcx or xabcabcx, but does match"

to:

"doesn't match xabcx, but does match"

Anonymous    Jan 01, 1999
Printed
Page 261

A little more than half way down the page, a line read:

With some C shells (but not all), you don't need the trailing dot (.):

It now reads:

With some shells (but not all), you don't need the trailing dot (.):

Anonymous    Apr 01, 1999
Printed
Page 264

The last paragraph now reads:

(Two notes: First, some UNIXes don't update the last-access time
of executable files (21.05) when you run them. Shell scripts are
always read, so their last-access times are always updated. Second,
for some bizarre reason, on systems I've seen, adding -u by itself
doesn't change the sorting order of ls -l; you also need -t, as in
ls -lut. Even more bizarre, on many systems--but not all--you don't
need -t to sort output by -c; simply type ls -lc.)

Anonymous    Apr 01, 1999
Printed
Page 265
changed the second sentence

"when the file was created" to "when a link was added"

so the sentence now reads:

The inode time tells when a link was added, when you used
chmod to change the permissions, and so on.

Anonymous    Jan 01, 1999
Printed
Page 267
changed the sentence in the third paragraph

The access time is the last time the file was read or written.

to:

The access time is the last time the file was read.

Anonymous    Jan 01, 1999
Printed
Page 269

The part of the code that used to read:

"$@"

Now reads:

${1+"$@"}

Anonymous    Jun 01, 2000
Printed
Page 270
The following text was added to the top of the page

"The ${1+"$@"} passes in quoted filenames from the command line
without breaking them into pieces at the spaces. This is a workaround
for differences in the way some old Bourne shells handle an empty
"$@" parameter.

Anonymous    Jun 01, 2000
Printed
Page 276
line 3: changed "give" to "gives"

Anonymous    Jan 01, 1998
Printed
Page 287
changed this troff source

Let's start with the normal Berkeley fIls-lfP output.
(The default fIsls-lfP gives a standard
date without the
six-month format switch or another shell programmer's headache, the
fItotalfP line.)

to this:

Let's start with the style of fIls-lfP output that
has fixed-width columns and doesn't show the group ownership.
(The default fIsls-lfP is similar, but its
date format doesn't change after six months and it
doesn't have the fItotalfP line.)

Anonymous    Jan 01, 1998
Printed
Page 296
The second paragraph in article 17.08 now begins


Newer versions....

The first example and the paragraph after it read:

% touch 03201600 /tmp/4PMyesterday

Then to find the files created after this, give the command:

They now read:

% touch -t 03201600 /tmp/4PMyesterday

(Some versions of fItouchfP don't need the fI-tfP option.)
Then to find the files created after this, give the command:

Anonymous    Apr 01, 1999
Printed
Page 297
At the top of the page, the first two code lines now have a

-t before the number in each:

% touch -t 0703104682 /tmp/file1
% touch -t 0804213785 /tmp/file2

Anonymous    Apr 01, 1999
Printed
Page 297
The following line of code was changed from roman to bold

% rm /tmp/file[12]

Anonymous    Jun 01, 2000
Printed
Page 325
In the first paragraph

"Here's how to do it"

now reads:

"Here's how to do it in both the Bourne-type and C-type shells"

Anonymous    Jan 01, 2001
Printed
Page 325

"and pipes them to a shell"

now reads:

"and pipes them to a Bourne shell"

Anonymous    Jan 01, 2001
Printed
Page 325
After "...if you aren't sure what files you'll be renaming" the

following text has been added:

Single quotes around the filenames are strongest; we use them in the
Bourne-type shell version. Unfortunately, csh and tcsh don't allow
$ inside double quotes (") unless it's the start of a shell variable
name. So the C shell version puts double quotes around the filenames--
and the Bourne shell version uses single quotes, like this:

Anonymous    Jan 01, 2001
Printed
Page 339-340
articles 19.06 and 19.07 revised

Anonymous    Jan 01, 1998
Printed
Page 341

The text used to read:

"To copy an archive to another directory, use the -o option,
followed by the name of the destination directory. (This is one of
the nicer features of cpio.)"

It now reads:

"To copy an archive to another directory, use the -p option,
followed by the name of the destination directory. (On some
versions of cpio, this top-level destination directory must
already exist.)

Anonymous    Jun 01, 2000
Printed
Page 355
section 20.09, para. 2, line 1,

"However, some versions of tar don't understand wildcards"

changed to

"However, in general, tar doesn't understand wildcards"

("tar" is still in italic.)

and the code line

% tar xvf /dev/rst0 `tar tf /dev/rst0 | grep 'pattern'`

changed to

% tar xvf /dev/rst0 `tar tf /dev/rst0 | egrep 'lib/(fooar)'`

(The entire line is in constant width bold font.)

and in para. 3, line 2

"The pattern supplied grep selects the file(s) you want"

changed to

"The pattern supplied to egrep (27.05) selects pathnames containing
lib/foo or lib/bar"

("egrep (27.05)" is a gray cross-reference, and "lib/foo" and "lib/bar"
are in italic.)

Anonymous    Oct 01, 1998
Printed
Page 366

The last sentence read:

If your version can do that, the syntax is probably like this:

% touch date filename1 filename2 ...

It now reads:

If your version can do that, the syntax is probably like this
(though your version may not need the fI-tfP):

% touch -t date filename1 filename2 ...

Anonymous    Apr 01, 1999
Printed
Page 367
Second line, the "yy" at the end of "modyhrmiyy" has been deleted

so it now reads:

modyhrmi

The "yy" paragraph has been deleted and the following paragraph has replaced it:

You can specify the number of seconds and the year (see your
touch(1) manual page). Note: older versions of touch without the -t
option, may have a different time format. For example, to make a
file named foo dated 4 p.m., March 20 of this year, give the command:

The next paragraph, beginning, "If you don't want to use...." now reads:

Versions of touch without the -t option have a problem. If you
want to set the current (not a different) time and the filename
starts with a number, be careful. touch may think that the filename
is a time and give the error "date: bad conversion." To enter a
filename that starts with a digit, use a relative pathname that
starts with a dot(.)(1.21). For example to make a file 123456 in
the current directory with a current timestamp:

Anonymous    Apr 01, 1999
Printed
Page 376
footnote: changed "Note that on a Berkeley UNIX system" to "On

some UNIX systems"

Anonymous    Jan 01, 1998
Printed
Page 376
last paragraph: deleted footnote, added "(your ls -l may look a bit

different)" before colon.

Anonymous    Jan 01, 1999
Printed
Page 377

Section 22.02, paragraph 2, line 5 read:

The second number specifies the permission.

It now reads:

The second number specifies the group's permission.

Anonymous    Aug 01, 1999
Printed
Page 388

The text used to read:

"Group membership is an important part of UNIX security. All users
are members of one or more groups, as determined by your entry in
/etc/passwd..."

It now reads:

"Group membership is important for UNIX security. All users are
members of one or more groups, as specified in the /etc/passwd..."

Anonymous    Jun 01, 2000
Printed
Page 388

The text used to read:

"Or use ypcat group | grep 100..."

It now reads:

"[Or use ypcat group | grep 100..."

Anonymous    Jun 01, 2000
Printed
Page 388

The text used to read:

"[Or ypcat group | grep mike1..."

It now reads:

"[Or ypcat group | grep mikel..."

Anonymous    Jun 01, 2000
Printed
Page 388

The text used to read:

"...use the newgrp command."

It now reads:

"...use the newgrp command to change your primary group."

Anonymous    Jun 01, 2000
Printed
Page 388
The following text replaced the paragraph starting with

"(System V even lets you change...":

"newgrp starts a subshell (38.04). Type exit to leave the
subshell.

newgroup can be important for another reason: your primary group
may own any new files you create (If you can't use newgrp, the chgrp
(1.23) command will change a file's group owner.) (You may be able
to change to groups that you don't belong to by giving a group
password. These are rarely used--usually the password field has a
*, which means there are no valid passwords for the group.)"

Anonymous    Jun 01, 2000
Printed
Page 392

The text currently reads:

"Although we recommend that you do not use crypt to encrypt files more than
1k long."

It should read:

"We recommend that you do not use crypt to encrypt files more than
1k long."

Anonymous   
Printed
Page 424

The text used to read:

"...use the command df -t 4.2."

It now reads:

"use df -t 4.2."

Anonymous    Jun 01, 2000
Printed
Page 425

The text used to read:

"...produces a significantly nicer report..."

It now reads:

"...produces a report..."

Anonymous    Jun 01, 2000
Printed
Page 425
The paragraph beginning with "This command shows..." was replaced by

the following text:

"df shows that the current directory and all its subdirectories
occupy about 2.5 MB (2634 KB). The biggest directories in this group
are stuff and howard, which have a total of 888 KB and 868 KB,
respectively. The total for each directory includes the totals for
any subdirectories, as well as files in the directory itself. For
instance, the two subdirectories private and work contribute 65 KB
to howard itself. (So, to get the grand total of 2634, du adds 107,
888, 868, and 769, plus files in the top-level directory.) du does
not show individual files as separate items unless you use its -a
option. Note that system V reports disk usage in 512-byte blocks,
not KB."

Anonymous    Jun 01, 2000
Printed
Page 466

changed code line 9 to read:

printf "%s
%s%s
", $0, s, m

Anonymous    Jan 01, 1998
Printed
Page 481
item 2 in numbered list: removed formatting errors (item

now starts with "agrep")

Anonymous    Oct 01, 1997
Printed
Page 521
line 3: changed "inle" to "inTable"

Anonymous    Jan 01, 1998
Printed
Page 602
changed last sentence to end

missing, the matched record is written to the standard output.

Anonymous    Jan 01, 1998
Printed
Page 609
in "print", next-to-last line: put "file" in quotes

Anonymous    Jan 01, 1998
Printed
Page 636
revised the first para. as follows

.Pe 0.5
A label consists of a colon (f(CW:fP), followed by up to
seven characters.
If the label is missing, the fIbfP command branches to the end of the
script.
(In the example above, the label f(CWendfP was included just to
show how to use one, but a label is not really necessary
here.)
.LP

Anonymous    Jan 01, 1998
Printed
Page 662
article 35.15, fourth paragraph: Changed from this

The following command will print just the permissions
(columns 1 to 10) and filenames (columns 45 to
the end of the line, including the space before names) from BSD
.Xw "fIls-lfP output" 0417 :

to this:

The following command outputs just the permissions
(columns 1 to 10) and filenames (columns 45 to the end
of the line, including the space before names) from
fixed-width
.Xw "fIls-lfP output" 0417 .
(Some versions of fIls-l adjust column widths.
If yours does, fIcolrmfP and fIcutfP won't help; try
.Xw fIawkfP 2860 .)

Anonymous    Jan 01, 1998
Printed
Page 738
last code, line 2: changed "Mail" and "People" to "mail" and

"people"

Anonymous    Jan 01, 1998
Printed
Page 740
changed "An entry in any of these fields can be a single

number" to "These fields can contain a single number"

Anonymous    Jan 01, 1998
Printed
Page 787
line 9: "-2390" should be "-ML" to attribute the section to

Mike Loukides

Anonymous    Oct 01, 1998
Printed
Page 795-796
item #2 is new

Anonymous    Jan 01, 1998
Printed
Page 829
changed

shell. For example, if fImsgsfP contains f(CWfirst next fP, then

to

shell. For example, if fImsgsfP contains f(CWfirst nextfP, then

Anonymous    Jan 01, 1998
Printed
Page 840
removed the lone "s"

Anonymous    Jan 01, 1998
Printed
Page 843
The following paragraph was added before the paragraph beginning with

"The advantages of getopt...":

"Some old Bourne shells have problems with an empty "$@" parameter
(46.07). If the opttest script doesn't work with an empty command
line, as in the first example above, you can change the "$@" in
the script to ${1+"$@"}."

Anonymous    Jun 01, 2000
Printed
Page 862
removed "RCSlog header" line so that the page ends with "-LM"

Anonymous    Oct 01, 1997
Printed
Page 884
section 45.30, para. 1, line 3: "slots" now reads "lots"

Anonymous    Aug 01, 1999
Printed
Page 891
In section 45.36, second paragraph, the following text has been

added after "(like modify some file, access a printer, etc.)":

To really do this right, the program needs
to both test for the lockfile and create it (if it doesn't exist) in
one atomic operation. If the test-and-set operation isn't
atomic--for instance, if a program tests for the lockfile in one command
and then creates the lockfile in the next command--there's a chance that
another user's program could do its test at the same precise moment
between the first program's (non-atomic) test and set operations. The
technique in this article lets you make a lockfile atomatically from a
shell script.

Note:
This technique doesn't work for scripts run as the superuser root.
It depends on the fact that a standard user can't write a file without
write permission. But root can write any file whether it has
write permission or not. If there's a chance that root might run your
script, you might want to add a test of the UID--by running the
id command, for instance--and be sure that the UID isn't 0 (the
superuser's).

Anonymous    Jan 01, 2001
Printed
Page 892
After the line "Once the first edmaster removes the lockfile,

the second edmaster can create the lockfile and do its editing
of config" the following text has been added:

(Note that some editors--for instance, nvi-1.79 under Linux--
automatically get a write and/or read lock before you edit a file.)

Anonymous    Jan 01, 2001
Printed
Page 892
After the line "The rest of the shell script keeps its normal

mask" the following text has been added:

And, if the redirection fails (because the lockfile exists), only the
subshell will abort--not the parent shell running the script.

Anonymous    Jan 01, 2001
Printed
Page 901
The following sidenote was added above "2>&1 45.21"

"$@" 44.15

Anonymous    Jun 01, 2000
Printed
Page 914
removed the line between "if (!d..." and "-DG"

Anonymous    Oct 01, 1997
Printed
Page 926
cal_today script (code sample 2), line 6

sed -e 's/^/ /' -e "s/ $4$/>$4</" -e "s/ $4 />$4</"

changed to

/usr/bin/cal |
sed -e 's/^/ /' -e "s/ $4$/>$4</" -e "s/ $4 />$4</"

Anonymous    Oct 01, 1998
Printed
Page 932-933
moved the last line on p. 932 to the top of p. 933

Anonymous    Jan 01, 1998
Printed
Page 950
code line -2: changed fL to fI

Anonymous    Oct 01, 1997
Printed
Page 959

(959) Next to "somecmd:" the phrase "command not found" is now in Courier font.

Anonymous    Apr 01, 1999
Printed
Page 964
line 1 of 51.04: removed "xs"

Anonymous    Oct 01, 1997
Printed
Page 979
last two sentences of "expect": took everything but "Tcl/tk"

out of itals

Anonymous    Oct 01, 1997
Printed
Page 991
under "watchq": changed "script daemon" to "daemon script"

Anonymous    Jan 01, 1998
Printed
Page 1005 and 1006
changed all the "ora.com"s to "oreilly.com"

Anonymous    Oct 01, 1997
Printed
Page 1006

changed the last sentence to read:

"Once you've decoded the file, read article 19.07 about extracting
the files from the archive."

Here is the troff:

Once you've decoded the file, read article
.Xa 0398
about extracting the files from the archive.

Anonymous    Oct 01, 1997
Printed
Page 1033
backslash, 1,2 entry: removed formatting errors so that it now

reads

1, 2 metacharacters, 463

Anonymous    Oct 01, 1997
Printed
Page 1034

The index entry under $ (dollar sign) used to read:

$@, 838, 842, 884, 899, 926

It now reads:

"$@", 838, 842, 884, 899, 926

Anonymous    Jun 01, 2000
Printed
Page 1040
"command command" entry: removed fI and fP

Anonymous    Oct 01, 1997
Printed
Page 1060
ps command: "-ef option" entry: made the "//" into "\" in the

troff code, causing them not to appear in the text. The entry now
appears as follow:

-ef option (System V), 700

Anonymous    Oct 01, 1997
Printed
Page 1063
same change for "-e option" under "sh (Bourne shell)" entry

Anonymous    Oct 01, 1997
Printed
Page 1068
fixed "Time to go now" message entry to say: "Time to go now" message

(and then the page number)

Anonymous    Oct 01, 1997
Printed
Page 1075
The paragraph beginning with "Whenever possible, our books..."

was removed from the colophon.

Anonymous    Jun 01, 2000