Errata


Print Print Icon

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.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.


Color Key: Serious Technical Mistake Minor Technical Mistake Language or formatting error Typo Question



Version Location Description Submitted By
Printed Page 24
the bystates program script, has a "$*." to read from standard

input,
I think this is not needed.

Anonymous 
Printed Page 24
24, 25

on page 24 the following code omits a critical line
----------------------------------------------------
#!/bin/sh
awk -F, '{
print $4 ", " $0
}' $* |
sort |
awk -F, '
$1 == LastState {
print " " $2
}
$1 != LastState {
LastState = $1
print $1
}'
--------------------------------------------------------
on page 25 the correct piece of code is shown

$1 == LastState {
print " " $2
}
$1 != LastState {
LastState = $1
print $1
print " " $2
}'

Anonymous 
Other Digital Version 48
Last paragraph first line

Errata for the errata at

http://oreilly.com/catalog/errata.csp?isbn=9781565922259

$ grep " ["[{(]*book[]})"?!.,;:'s]* " bookwords

should be

$ grep " [\"[{(]*book[]})\"?\!.,;:'s]* " bookwords

Peter J. Rosario 
Printed Page 133
Chapter 6

I just wanted to report a few errors in the examples from the book "sed &
awk", second edition by Dale Dougherty and Arnold Robbins.

I am referring to the examples in:

ftp://ftp.ora.com/published/oreilly/sed2/progs.tar.gz

The first error is that the name of the directory is listed in the book as:

/published/oreilly/nutshell/sedawk2/
---------------------------


Secondly, in the directory called ch06, the example entitled "phrase" is
correct in the book, but is missing a final line in the example source. The
last line should be "done". (I numbered the lines to refer to them):

01 #! /bin/sh
02 # phrase -- search for words across lines
03 # $1 = search string; remaining args = filenames
04 search=$1
05 shift
06 for file
07 do
08 sed '
09 /'"$search"'/b
10 N
11 h
12 s/.*\n//
13 /'"$search"'/b
14 g
15 s/ *\n/ /
16 /'"$search"'/{
17 g
18 b
19 }
20 g
21 D' $file
22 done <------------------------------ this is missing in the example

Finally, the "N" in line 10 should be "$!N" or the last line will always
print.

I like the book very much, and point out these items only to make it better...

HTH and Best regards,


Glenn
--------
Glenn R Williams

Anonymous 
Printed Page 242
after 3rd paragraph, in man.split script

If I understand the code correctly, the first comment "#this conditional collects lines until we get to a filename" is clear and accurate for the if portion of the statement,
if (file==0)
line[++i] = $0

but it is not clear and accurate for the else portion of the statement

else
print $0 > filename
.

The else portion of the statement will print out all the lines after the line containing the previous filename until a line with a new filename is identified. The else portion also allows all the lines after the final name to be printed out. This is not clear in the comment of the code, nor is it explained in the description following the code on page 243. I think it would help the readers if the comment was modified and the action of the else statement added to the code description.

Anonymous 
Printed Page 300
3rd paragraph - output of "input.idx" script in middle of page

The contents of the "test" file is shown to include an entry:

toolkit (See X Window System).

The output of the "input.idx" script does not include the results of processing this entry. From the script, I think the entry should be processed to read:

toolkit:(See X Window System)

Anonymous