Errata

Effective awk Programming

Errata for Effective awk Programming

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 Note Update

Version Location Description Submitted by Date submitted
2.4
1st paragraph

1st paragraph under section 2.4. Using Character Lists

The text reads:
"instead it might be equivalent to [aBbCcDdxXyYz], for example"

I believe it should say,
"instead it might be equivalent to [AaBbCcDdxXyYz], for example" (notice upper case A)?

Anonymous  Dec 07, 2014 
Printed Page 39
Changing the contents of a field

The first code on Page 39

awk '{ nboxes = $3 ; $3 = $3 - 10
> print nboxes, $3}' inventory-shipped

should actually return the following result:

ifiaz@nimitz:/tmp/fiaz > awk '{ nboxes = $3; $3 = $3 - 10
print nboxes, $3}' invshipped
25 15
32 22
24 14
...
...

instead of as the book shows:

13 3
15 5
15 5

which is for nboxes=$2 and $2 = $2 - 10.

Anonymous   
Printed Page 237
4th line from bottom

where it says :

awk -f program -- options files

shouldn't this read :


awk -f program options -- files

as the "--" (signifying the end of the command line options) should come after the options and before the files ?

and again on the following page (6th line) where it says :

cut.awk -- -c1-8 myfiles > results

shouldn't this read (for the same reason) :

cut.awk -c1-8 -- myfiles > results


Anonymous  Apr 27, 2012