Bash Command Line And Shell Scripts (Mercury Learning)

Author: Oswald Campesato
Publisher: Mercury Learning
Pages:266
ISBN: 978-1683925040
Print: 1683925041
Kindle: B08BJCFDKD
Audience: Bash users with an interest in processing data
Rating: 4
Reviewer: Mike James
Bash is it a computer language? Of course...

but sometimes it just looks like the Linux command line. As a result books on the "language" have to make a choice of targeting programmers or users.  Books that target the programmer tend to assume that the reader knows most of the basics of the Linux command line and proceed from this point to introduce programming features that make scripting possible.This Pocket Primer spends a lot of time discussing the Linux command line and so is much more suitable for the beginner.

Banner

It starts off with a look at what Bash is and what shells use it and what you are likely to encounter in the real world. From here we have a fairly standard account of the command line mostly working with files. My only complaint is that there isn't enough distinction between the features that are Bash and those that are simply Linux/Unix utilities. Chapter 2 continues with an in-depth look at file commands. Chapter 3 lists "useful" commands - of course what is useful depends on what you are trying to do, but this is not a bad selection. 

 

Chapter 4 is where we really start dealing with Bash. It introduces expressions, variables, conditionals and loops. This is what makes Bash a programming language. This is quite a short chapter and if you are completely new to the idea of programming you might well find it hard going. What makes this worse is that after this chapter the book settles on explaining "big" Linux/Unix utilities. This is great if your main concern is writing Bash to process text or data - less so if you are wanting to use Bash to create installation or maintenance scripts.

Chapter 5 is about grep, the pattern matching utility that every Linux user encounters in some form or other eventually. This needs a book to itself. Chapter 6 is about sed, a stream editor which can be used to process files of text or data. This needs a book to itself. Chapter 7 completes the trilogy of chapters that are on topics big enough to fill a book in their own right. It is about awk, another text processing and data manipulation utility.

Chapter 8 returns to Bash programming with a look at how you can create shell scripts. For me this is what Bash is all about. Chapter 9 moves on to use the "big" utilities - grep and awk - in shell scripts to automate the data processing. The final chapter is a collection of interesting shell scripts. There are scripts for cron and for examining logs. There is no sign of systemd which is something many will not miss, but I regard this as the modern way to do things under Linux.

Conclusion

If you are looking for a book on programming using Bash then this probably isn't the book you want. Having said this, there are a lot of good examples which you might want to read through to make sure you know what you are doing. The emphasis on awk, sed and grep mean that it is much more suited to a user who wants to learn how to process messy data and if you fall into this category you might find this book a practical introduction to such things - but note it isn't easy. I have to admit that on occasion I have abandoned using awk in favor of writing exactly what I needed in Python... but then I know Python. 

 

To keep up with our coverage of books for programmers, follow @bookwatchiprog on Twitter or subscribe to I Programmer's Books RSS feed for each day's new addition to Book Watch and for new reviews.

Banner


Discovering Modern C++, 2nd Ed

Author: Peter Gottschling
Publisher: Addison-Wesley
Pages: 576
ISBN: 978-0136677642
Print: 0136677649
Kindle: ‎ B09HTJRJ3V
Audience: C++ developers
Rating: 5
Reviewer: Mike James

Modern C++ who would want to write anything else? Is this a suitable introduction for the rest of us?



Programming with Rust

Author:  Donis Marshall
Publisher: Addison-Wesley
Pages: 400
ISBN: 978-0137889655
Print: 0137889658
Kindle: B0CLL1TGVT
Audience: Programmers wanting to learn Rust
Rating: 3
Reviewer: Mike James
Rust is the language we all want to learn at the moment so this is just in time.


More Reviews

Last Updated ( Saturday, 01 May 2021 )