Reviews
Mar 06, 2011

Linux Shell Scripting Cookbook Review

As the Linux operating system has been getting more and more popular, many system administrators want to learn Linux shell scripting for a larger feature set. The Linux terminal is a powerful feature; combining that with shell scripting, you can really unlock some of the neglected features of any Linux operating system.

Shell scripting isn't something you can pick up by knowing a programming language like Objective C; it's much different from the regular programming languages that require compiled binary files to run. Packt Publishing recently released Linux Shell Scripting Cookbook covering many topics of Linux shell scripting.

In fact, Linux Shell Scripting Cookbook covers 119 effective examples to get things done efficiently. If you've thought we're out of these scripting days, think again! System administrators rely on this every day! Whether you want to list the top ten CPU consuming processes in an hour or how to set up logfile management with logrotate, this book is for you! Let's dig right into that full review!

My Background on Linux Shell Scripting

I've been using the Linux operating system for nearly six years. I've wrote many programs along with scripts to do many custom actions with cron and such. Most of my servers run on Debian Linux and I have to say that shell scripting is key when working with a Linux server.

I use Linux nearly every day and write about one shell script every week. You could call me an expert on Linux; I'm in fact, a system administrator.

What's Covered

There's simply too many topics in Linux Shell Scripting Cookbook to cover them all. How about we list out some of the critical points?

  • Using aliases
  • Debugging scripts
  • Run-down on comparisons and tests
  • Using cat
  • Listing and finding files
  • Verifications with checksums
  • Finding and deleting duplicate files
  • Parsing and replacing text
  • Using cURL
  • Backing up and compressing (gzip, bzip, and even zip are covered)
  • Cloning with dd (awesome section!)
  • Version control with Git
  • Using rsync (my personal favorite backup tool)
  • Networking
  • System admin and administration tools
  • And more!

Linux Shell Scripting Cookbook covers all of the main aspects I expect to see in a shell scripting book. Most of these recipes are just a few pages long and are described in a very simple and easy way.

What an awesome book

After reading Linux Shell Scripting Cookbook, this is by far one of the most useful books from Packt Publishing that I have ever read! Sarath Lakshman really knows his stuff about GNU/Linux.

The best thing about Linux Shell Scripting Cookbook is that it's set up in a way that's so easy to understand. It's meant for both a begineer to an intermediate user. I have to say, Sarath also taught me a few things that I used to do with much more code. What's even better, is that everything is covered to make sure you're building upon what you already learned.  The first chapter teaches you the basics in Bash. No prior knowledge is needed and that's one key thing that makes Linux Shell Scripting Cookbook an awesome book.

One of my favorite things about Linux Shell Scripting Cookbook is that it's just so simple! Unlike many shell scripting books, you're not going to be writing a huge script with 1,000 lines. Instead, Linux Shell Scripting Cookbook is more of an introduction to all of the 119 features Sarath mentions. By the end of the book, you should feel confortable to take everything you have learned and create one nice juicy, functional script out of it!

Not only is all of the code fully documented in the book, you can also download all of the sample code off Packt Publishing's website. I wish that the sample code was fully commented though. Most of the provided code has very few comment lines. For beginners, the inline comments in the code is something that helped even myself.

I do have to mention two slight downfalls. The first slight downfall is that some of the topics discussed, like MySQL, you need to have extra programs installed. It might be nice if Sarath walked the reader through on how to set up the additional software. Something like running "apt-get install mysql-server mysql-client" and a simple walkthrough the setup (like setting up the root password) would be more than enough. I wouldn't assume that the user knows how to do this prior to reading the book.

Overall

For the most part, I really enjoyed Linux Shell Scripting Cookbook. It contains all of the different subjects I expect a shell scripting book to cover and even more! In this rather tiny 360 page book, so much is covered.

It's just the little things holding back Linux Shell Scripting Cookbook from calling it a perfect book! Of course more could be put into this book, but with over 110 different recipes, I'm quite sure every reader will love all of the knowledge after they're done with the book. The best part is that none of the topics mentioned book are 'unstandard'. Every single recipe in Linux Shell Scripting Cookbook is a common way on how to get that certain action done. In fact, the popular tools are mainly covered; dd, which is commonly used for hard drive cloning (and is known for its awesome recovery tools), and even MySQL, which is used for storing databases, is covered. You'll find more popular tools like gzip and even the famous cat tool.

Whether you're just a begineer or one advanced system administrator who wants to get their hands messy with shell scripting, I highly recommend Linux Shell Scripting Cookbook. When I started learning Linux six years ago, all I had was the online world. With Linux Shell Scripting Cookbook, you'll be able to learn all of the common and advanced features of Linux shell scripting in just a couple hundred pages!

Stalk me on social media! Any other way would just be creepy…