- 出版社: O'Reilly Media, Inc, USA (2009年1月1日)
- 丛书名: Pocket Reference (O'Reilly)
- 平装: 750页
- 语种： 英语
- ISBN: 0596153600
- 条形码: 0636920153603, 9780596153601
- 商品尺寸: 10.8 x 0.7 x 17.8 cm
- 商品重量: 81.6 g
- 品牌: O'Reilly Media, Inc, USA
- ASIN: 0596153600
- 用户评分: 1 条商品评论
- 亚马逊热销商品排名: 图书商品里排第589,563名 (查看图书商品销售排行榜)
grep Pocket Reference (英语)
John Bambenek is an information security practitioner from Champaign, Illinois. As a graduate from the University of Illinois with a B.A. in Theoretical Astrophysics (emphasis in extragalactic astrophysics) and a minor in Mathematics, he has been employed as a project manager at Cap Gemini Ernst and Young, where he provided consulting services to numerous Fortune 500 firms. He continues to provide his expertise to the SANS Institute by authoring published course materials and exams. He also operates the charitable Tumaini Foundation, which provides funds and other needed resources to Tanzanian schools for AIDS orphans. He is also known for his current work in spyware and botnet technology, and their use concerning identity theft. He is also a volunteer as an incident handler for the Internet Storm Center, and his research has been cited in various media venues such as the New York Times and the Washington Post. Agnieszka Klus was born in Rzeszow, Poland and came here as a child. She lives in the northwest suburb of Chicago, but considers herself a Chicagoan. She is currently trying to get her Masters in Accountancy at the University of Illinois at Urbana-Champaign, and also works as a system administrator at the Coordinated Science Laboratory.
This "grep Pocket Reference" did a good job of explaining the grep options in tandem with the it's Manual Page. Although few, I thought the examples near the end were great. However, the examples seemed to be themed on personal private data searching rather then something more relevant to a computer users -- but they could easily be converted.
This EBook needs some corrections (a reprint including errata?) as it contains some grammar or run-on sentences which conflict and provide incorrect data. Also, there's a sentence in the book stating, in effect, it's OK or legal to use fgrep to search other peoples EMail. I'm no lawyer, but this doesn't sound correct. Again, those few sentences probably need a little rewording.
All in all, besides the fact it needed a good proof reading -- the book taught me what I needed to learn about grep as it's manual page lacks examples and a certain amount of clarity. (Currently, grep's manual page is written like a specification rather then something focused towards a user, omitting example usage.)
(There is a small chapter on Perl REGEX. ie. --perl-regexp)
If you need a book to learn REGEX and have a little trouble with the GREP Manual Page, or don't want to read a huge book like Mastering REGEX, get this book for learning REGEX (aka BRE/ERE).
Also noteworthy, the MOBI formated EBook version of this "grep Pocket Reference" is the first readable MOBI EBook I've been able to read so far on my Kindle DXG. This book had few TABLE TAGS (or computer technical drawings/coding). And of the presented console/terminal text presented, it was readable unlike many other MOBI technical books I've tried to read.
Edited 2011.11.19: Also, GREP originates from the line editor called 'ed' (ie. command syntax: g/re/p) according to the author Robbins of the book sed & awk (2nd Edition). The third chapter of the sed & awk (2nd Edition) is devoted to regular expressions (grep), as sed & awk depend on this feature for searching.
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.