Chapter 3. Tutorial / Reference

 

...there are dark corners in the Bourne shell, and people use all of them.

  Chet Ramey
Table of Contents
3.1. Exit and Exit Status
3.2. Special characters used in shell scripts
3.3. Introduction to Variables and Parameters
3.4. Quoting
3.5. Tests
3.5.1. File test operators
3.5.2. Comparison operators (binary)
3.5.3. Nested if/then Condition Tests
3.6. Operations and Related Topics
3.6.1. Operators
3.6.2. Numerical Constants
3.7. Variables Revisited
3.7.1. Typing variables: declare or typeset
3.7.2. Indirect References to Variables
3.7.3. $RANDOM: generate random integer
3.7.4. The Double Parentheses Construct
3.8. Loops and Branches
3.8.1. Loops
3.8.2. Nested Loops
3.8.3. Loop Control Commands
3.8.4. Testing and Branching
3.9. Internal Commands and Builtins
3.10. External Filters, Programs and Commands
3.10.1. Basic Commands
3.10.2. Complex Commands
3.10.3. Time / Date Commands
3.10.4. Text Processing Commands
3.10.5. File and Archiving Commands
3.10.6. Communications Commands
3.10.7. Terminal Control Commands
3.10.8. Math Commands
3.10.9. Miscellaneous Commands
3.11. System and Administrative Commands
3.12. Command Substitution
3.13. Arithmetic Expansion
3.14. I/O Redirection
3.14.1. Using exec
3.14.2. Redirecting Code Blocks
3.14.3. Applications
3.15. Here Documents
3.16. Recess Time
3.17. Regular Expressions
3.17.1. A Brief Introduction to Regular Expressions
3.17.2. Using REs in Scripts
3.18. Subshells
3.19. Restricted Shells
3.20. Process Substitution
3.21. Functions
3.21.1. Complex Functions and Function Complexities
3.21.2. Local Variables and Recursion
3.22. Aliases
3.23. List Constructs
3.24. Arrays
3.25. Files
3.26. /dev and /proc
3.27. Of Zeros and Nulls
3.28. Debugging
3.29. Options
3.30. Gotchas
3.31. Scripting With Style
3.32. Miscellany
3.32.1. Interactive and non-interactive shells and scripts
3.32.2. Tests and Comparisons
3.32.3. Optimizations
3.32.4. Assorted Tips
3.33. Bash, version 2