Winter Driving Best Books of the Month Valentine's Day Shop Learn more nav_sap_SWP_6M_fly_beacon King easycohice_2016 All-New Amazon Fire TV Subscribe & Save Valentine's Day Cards Find the Best Purina Pro Plan for Your Pet Amazon Gift Card Offer chiraq chiraq chiraq  Amazon Echo All-New Fire Kindle Paperwhite Prime Exclusive Savings in Video Games Shop Now Sale
Customer Review

8 of 9 people found the following review helpful
2.0 out of 5 stars Not what I hoped for, July 3, 2012
By 
This review is from: grep Pocket Reference (Pocket Reference (O'Reilly)) (Paperback)
grep is such a tool that one uses continually every unix console session. Great to spend an evening reading up about that tool, just to get introduced to the more advanced uses. 75 pages would be plenty to tell something nice, not deal extensively with regular expressions. So quite some space to tell something new, right?

Wrong. Regular expressions keep on being the central focus of this book, despite being uncapable of telling how they really work. The examples of Advanced Use are how to match lines with IP-addresses and ISBN-numbers, AKA regular expressions. No word on how to make the use of grep itself nicer.

* On page 9., option -e is used without explaining what it does.
* Page 25. It seems like they want to show how to avoid a pipe from one grep to another, but they just show got rid of the cat statement. The text does not make sense, and there is no pointer to where to look in the book to get performance increase.
* p.60: '/' really should have been a '\'.
* In the discussion of command line options, nor of the environment variables, an explanation of the practical difference between 'auto' and 'always' has been omitted. I would have hoped for a discussion on how to use pagers like less with color support (No sweat to figure out yourself: exporting GREP_OPTIONS="--color always" and LESS="-R" works for me to retain the color marks).
* As the final words, the authors warn about using grep on a multitude of files, as this could run into the limits of the system. Of course, a combination of find and xargs is a more subtle and correct one, which does not happen to run into this limit. The authors suggest that one should rebuild the kernel to overcome this limitation. I have not tried it, but I havily syspect that this could be remedied with changing the allowed number of open files imposed by ulimit.

Except for these factual errors, the authors have mainly reiterated what is written in the man and info pages. I was hoping for some interesting tips on how to integrate the usage of grep in daily tasks. The book spends a 30 % of its space to explaining the special characters. This information can be found in a split second with 'man grep | grep -C2 "\^"'. The context options -A, -B, and -C dwell somewhere in obscurity, as they could have been used to show how they make sense while parsing logs, or text written by humans.

I imagine that this book does provide a nice introduction to the command. But if you find yourself navigating man pages regularly, and have encountered a regular expression before, there is not much to gain from this book.
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No

[Add comment]
Post a comment
To insert a product link use the format: [[ASIN:ASIN product-title]] (What's this?)
Amazon will display this name with all your submissions, including reviews and discussion posts. (Learn more)
Name:
Badge:
This badge will be assigned to you and will appear along with your name.
There was an error. Please try again.
Please see the full guidelines here.

Official Comment

As a representative of this product you can post one Official Comment on this review. It will appear immediately below the review wherever it is displayed.   Learn more
The following name and badge will be shown with this comment:
 (edit name)
After clicking the Post button you will be asked to create your public name, which will be shown with all your contributions.

Is this your product?

If you are the author, artist, manufacturer or an official representative of this product, you can post an Official Comment on this review. It will appear immediately below the review wherever it is displayed.  Learn more
Otherwise, you can still post a regular comment on this review.

Is this your product?

If you are the author, artist, manufacturer or an official representative of this product, you can post an Official Comment on this review. It will appear immediately below the review wherever it is displayed.   Learn more
 
System timed out

We were unable to verify whether you represent the product. Please try again later, or retry now. Otherwise you can post a regular comment.

Since you previously posted an Official Comment, this comment will appear in the comment section below. You also have the option to edit your Official Comment.   Learn more
The maximum number of Official Comments have been posted. This comment will appear in the comment section below.   Learn more
Prompts for sign-in
 

Comments

Tracked by 1 customer

Sort: Oldest first | Newest first
Showing 1-1 of 1 posts in this discussion
Initial post: Aug 1, 2012 9:52:15 PM PDT
BruceK says:
It appears like your catches are valid, but really they are fairly minor. The -e option should be explained elsewhere if someone is confused - that is more errata. Grep is a pain since there are several versions of it depending on what system you are on. I could see downgrading the book to maybe a 3 or 4, but a 2 ??? At least you didn't stick it with a 1! ;-)
‹ Previous 1 Next ›

Review Details