Bash Scripting Handbook
Bash Scripting Handbook is a clear, example-based reference for learning and writing Bash scripts. This book focuses on the commands and concepts you’ll actually use when working in the shell.
Each section is short and practical, built around examples you can use right away. It's useful for beginners learning the basics, and for experienced users who want a reliable reference while scripting.
What will you learn?
The book starts with Bash fundamentals and then builds up toward more advanced scripting techniques. You’ll go through variables, arrays, loops, conditions, functions, quoting, redirection, and debugging. Then you’ll dive into command chaining, substitution, process substitution, and regular expressions. Each topic is covered in a clear and concise format with real examples and practical explanations.
Chapters Covered:
- Getting Started
- Built-in Commands
- Arrays
- Conditions and Flow
- Loops
- Functions
- Arithmetic Operations
- Parameter Expansion
- Command-line Chaining
- Command Substitution
- Process Substitution
- Bitwise Operators
- Quoting
- Globbing
- Pipelines and Redirections
- Exit Status Codes
- History
- Options
- Regular Expressions
How to Use This Book
You don’t need to read everything in order. Skip around, copy examples, test commands, and come back whenever something doesn’t quite make sense. This is your toolkit, use it how you like. I’ve structured it to start with the basics and gradually move into more advanced topics.