Chapter 3. The Bash environment

Table of Contents

1. Shell initialization files
1.1. System-wide configuration files
1.2. Individual user configuration files
1.3. Changing shell configuration files
2. Variables
2.1. Types of variables
2.2. Creating variables
2.3. Exporting variables
2.4. Reserved variables
2.5. Special parameters
2.6. Script recycling with variables
3. Quoting characters
3.1. Why?
3.2. Escape characters
3.3. Single quotes
3.4. Double quotes
3.5. ANSI-C quoting
3.6. Locales
4. Shell expansion
4.1. General
4.2. Brace expansion
4.3. Tilde expansion
4.4. Shell parameter and variable expansion
4.5. Command substitution
4.6. Arithmetic expansion
4.7. Process substitution
4.8. Word splitting
4.9. File name expansion
5. Aliases
5.1. What are aliases?
5.2. Creating and removing aliases
6. More Bash options
6.1. Displaying options
6.2. Changing options
7. Summary
8. Exercises

Abstract

In this chapter we will discuss the various ways in which the Bash environment can be influenced:

  • Editing shell initialization files

  • Using variables

  • Using different quote styles

  • Perform arithmetic calculations

  • Assigning aliases

  • Using expansion and substitution