Computing Reviews
Today's Issue Hot Topics Search Browse Recommended My Account Log In
Review Help
Search
Pro Bash: learn to script and program the GNU/Linux shell (3rd ed.)
Varma J., Apress, New York, NY, 2023. 305 pp. Type: Book (9781484295878)
Date Reviewed: Feb 15 2024

This is an excellent reference book for those who need to write Bash scripts. It is well organized, logically presented, and covers all the major commands and structures that are necessary to write useful scripts. The book makes few assumptions about the reader’s expertise with Bash. Concepts are introduced in a logical order, and the reader is guided through the process of writing more complex and useful scripts as the book progresses. The book begins with a simple “Hello, World!” script; it then covers input/output (I/O) and redirection before moving on to branching and looping. From there the book examines command-line parsing and expansion, parameters, and variables, including environment variables. Arrays are covered in reasonable depth, and changes that have taken place over the various versions of the Bash scripting language are addressed. The book then looks at shell functions and string manipulation before moving on to file operations. The authors then address reserved words and built-in commands before closing with some helpful advice on how to develop and test scripts.

Now that the basic concepts and tools have been introduced, the authors move on to examine script programming for the command line, runtime configuration, data processing, and scripting for the screen. Readers now have a fairly complete understanding of script programming, which the authors round out with some fun scripts to roll dice and play simple games. Each chapter ends with a summary, a list of the commands introduced, and some exercises for the reader to try in order to practice the skills they have just learned.

As helpful as the book is for teaching how to write powerful and useful shell scripts, some aspects could be improved. For example, syntax (such as the need for spaces after/before brackets in certain circumstances) is not covered and explained. There are also some minor formatting issues in the text, that is, the sample output from a script does not precisely match what a user would see if a script were executed. While these are generally not major problems, there are instances when demonstrating formatting, for example, where one line of output differs from the previous examples and it should not. Some greater care in the editing phase would have been helpful.

Finally, some important aspects of the shell are not covered at all. Specifically, ~/.bash_profile, ~/.bash_login, ~/.profile, and ~/.bash_logout are not covered. This is a shortcoming I would like to see addressed in any future edition of the book, as it is important for users to understand how to create a suitable environment without needing to manually run a number of scripts.

Reviewer:  Michael Oudshoorn Review #: CR147708
Bookmark and Share
  Featured Reviewer  
 
Linux (D.4.0 ... )
 
 
Programming Techniques (D.1 )
 
Would you recommend this review?
yes
no
Other reviews under "Linux": Date
LINUX
Strobel S. (ed), Uhl T. (ed), Springer-Verlag New York, Inc., New York, NY, 1994. Type: Book (9780387580777)
Jun 1 1995
Linux network administrator’s guide
Kirch O., O’Reilly & Associates, Inc., Sebastopol, CA, 1995. Type: Book (9781565920873)
Aug 1 1996
Linux multimedia guide
Tranter J., O’Reilly & Associates, Inc., Sebastopol, CA, 1996. Type: Book (9781565922198)
Feb 1 1998
more...

E-Mail This Printer-Friendly
Send Your Comments
Contact Us
Reproduction in whole or in part without permission is prohibited.   Copyright 1999-2024 ThinkLoud®
Terms of Use
| Privacy Policy