Expert Shell Scripting (Expert's Voice in Open Source)
F**T
Expert Shell Scripting
If nothing else i would have bought this book just for the first chapter over debugging.I bought this with some background in taking a class or two in C++ and Java. So programing structures and basic understanding of programming is probobly good to get the most out of this book.I woulnt buy this book alone to learn Shell Scripting, but if just starting/learning I would recomend this book in conjunction with a lot of google searching for some bash shell how to's etc. Perfect target for someone whos knowledgeable on programming and structures, and has a entry level of Bash shell scripting.Also i liked how this book goes into great detail explaning the scenario that the code examples were written for, and details over how to acomplish the tasks, and some issues you might run into, and how to possibly handle those. Gives a great foundation for modifying and building to your own needs.
N**S
Invaluable techniques for building and managing a *nix farm
If you are responsible for supporting and building a fleet of *nix hosts and want to achieve better productivity and reliability or even if you have an interest in improving your scripting skills for other purposes, then this book is well worth a look. The 42 chapters cover scripting techniques along with complete solutions used in production environments that have been developed or enhanced by the author over many years. Example scripts are worked through in an easy to follow style so you can understand why code is written a particular way, thus enabling you to adapt examples to your specific purposes.While the book is aimed at those with immediate to advanced shell coding experience, the first 10 chapters cover a range of basic but very useful scripting techniques, for example, in chapter 1, where we look at debugging techniques, a useful alert function is included. Special attention is paid to the typical traps for the unwary, such as variable visibility and how this differs between commonly used shells; some shells create a sub-shell while others don't when running the same code! The section on comparison testing syntax is also very useful, given how critical this is for scripts to function as intended! This is supported by an appendix showing which test switches work with the system test command and which work with the built in test command in bash and ksh. Chapter 9 has a good explanation of stdout and stderr file redirection and how to set up access to user specified file handles.The middle section of 19 chapters deals with system interaction and advanced techniques, e.g. why cron's environment can result in different script behaviour than what you observe when testing your cron script in a user or root environment. Obtaining complete and reliable backups is always an issue and chapter 20 looks at ways to overcome the limitations of cp. Chapters 21 and 22 look at how to use X Display over the network, with neat scripts showing when user has become root and how to throw a timed root window. Grep, awk, sed and a few other commands regularly appear throughout the book, where the syntax for data extraction using these commands for different purposes is explained, along with the escape syntax required for special characters. These commands get a big work-out in a lengthy Chapter 24, where text-processing to gather host information using one-liners is covered.The final 13 chapters describe in detail how a range of useful scripts function, along with tips on changes necessary for the scripts to work with HP and Solaris as well as different flavours of Linux. Chapter 35 includes a very good example of how to assemble a Hosts Health Report by extracting and colour coding /proc extracts to highlight system health status. Chapters 36 and 37 cover scripts used to send out emails warning users their password is about to expire and how to set up a pseudo shadow password file on unix systems without this. Lots of useful techniques in these chapters! Chapter 38 shows how to automatically partition and build Linux systems remotely and chapter 39 covers how to capture file snapshots hourly through to annually. Cleverly, this script uses rsync to create hard links to unchanged files in earlier backups, thus minimising disk usage.The source code is available from the publisher's web-page for the book at [...], as is the table of contents (make sure you page past the contents at a glance and look at the detailed contents listing!) plus a complete sample chapter on command line email attachments. If you suspect this book will be frequently referenced, I'd recommend purchasing the eBook, so you can search on-line rather than rely on the 13 page index.If you can't find monitoring scripts that you can readily implement in your production environment in this book, you are sure to find techniques that you can adapt to your needs along with answers on why scripts you've written haven't worked as anticipated. I definitely recommend this book to anyone interested in extending their scripting skills to ease management of a *nix production environment.
A**R
Adds context and ties concepts together
Expert Shell Scripting helps bridge the gap between following a recipe and truly solving problems.It's not a cookbook, and it doesn't teach basic programming structures. As such, it would probably frustrate beginners. Where this book shines is that it adds context and ties concepts together beautifully.A full chapter on debugging, for example explores different approaches to troubleshooting, comparing and contrasting the various approaches, discussing where each approach might be appropriate, pointing out pitfalls and gotchas along the way. Another chapter deals with comparisons and tests, making sense of the intricacies and subtleties of comparing different types of things and the myriad of ways of doing it well, or doing it wrong. The book covers a wide range of topics, from command line switches and options, variable setting, date/time manipulation, text processing, and data redirection, scheduling, interaction, and automation.The progression is swift, and the book ends with a section of gems that the author has spent years accumulating.It is perfect for the programmer who has never written shell scripts (or just dabbled), since it quickly takes you beyond syntax and structures and bring you to the point where you can actually DO stuff in the shell. If you are an intermediate shell scripter it will probably fill in many gaps and catapult you to a higher level of competence.Highly recommended.
J**.
Good tool to have in your box
This book is not intended to teach you how to program nor the basics of shell scripting. The book identifies it's target audience as intermediate to advanced shell coders.Much of the book is presented in a narrative style, looking at a problem, proposing a solution and explaining how the various parts of that solution work. There are also some 'recipe' style sections, specifically Chapter 24 "Text-Processing One-Liners".I have personally found the book interesting from the very first chapter, which addresses some debugging techniques I was not aware of. So far it is proving handy to have nearby when I'm hacking on a shell script.
Trustpilot
Hace 5 días
Hace 4 días