Book description
Shell scripts are everywhere, especially those written in bash-compatible syntax. But these scripts can be complex and obscure. Complexity is the enemy of security, but it's also the enemy of readability and understanding. With this practical book, you'll learn how to decipher old bash code and write new code that's as clear and readable as possible.
Authors Carl Albing and JP Vossen show you how to use the power and flexibility of the shell to your advantage. You may know enough bash to get by, but this book will take your skills from manageable to magnificent. Whether you use Linux, Unix, Windows, or a Mac, you'll learn how to read and write scripts like an expert. Your future you will thank you.
You'll explore the clear idioms to use and obscure ones to avoid, so that you can:
- Write useful, flexible, and readable bash code with style
- Decode bash code such as ${MAKEMELC,,} and ${PATHNAME##*/}
- Save time and ensure consistency when automating tasks
- Discover how bash idioms can make your code clean and concise
Table of contents
- Preface
- 1. A Big âifâ Idiom
- 2. Looping Lingo
- 3. Just in CASE
- 4. Variable Vernacular
- 5. Expressions and Arithmetic
- 6. Functional Framework
- 7. List and Hash Handling
- 8. Arguing
- 9. Files and More
- 10. Beyond Idioms: Working with bash
- 11. Developing Your Style Guide
- A. The bash Idioms Style Guide
- Index
- About the Authors
Product information
- Title: bash Idioms
- Author(s):
- Release date: March 2022
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9781492094753
You might also like
book
Radar Trends to Watch: September 2023
Read about the latest developments on O'Reilly Media's Radar.
book
Learning Git
This book teaches Git in a simple, visual, and tangible manner so that you can build …
book
Fluent C
Expert advice on C programming is hard to find. While much help is available for object-oriented …
book
Foundations of Scalable Systems
In many systems, scalability becomes the primary driver as the user base grows. Attractive features and …