In this chapter, we'll learn how to work with data and variables in Bash, and how to use them with pattern matching and shell glob syntax. While you can get a lot done by just piping existing commands together, we often need variables to get more fine-tuned behavior from scripts.
We'll cover:
- Variable declarations and scope
- Environment variables
- String operations
- Arithmetic expressions
- Capturing program output in a variable
- Matching filenames with glob patterns
- Using arrays and associative arrays