Table of Contents
Chapter 22. Process Substitution...................................................................................................................320
Chapter 23. Functions....................................................................................................................................323
23.1. Complex Functions and Function Complexities.........................................................................325
23.2. Local Variables...........................................................................................................................335
23.2.1. Local variables help make recursion possible...................................................................336
23.3. Recursion Without Local Variables............................................................................................337
Chapter 24. Aliases.........................................................................................................................................340
Chapter 25. List Constructs...........................................................................................................................343
Chapter 26. Arrays.........................................................................................................................................346
Chapter 27. /dev and /proc.............................................................................................................................372
27.1. /dev..............................................................................................................................................372
27.2. /proc............................................................................................................................................373
Chapter 28. Of Zeros and Nulls.....................................................................................................................378
Chapter 29. Debugging...................................................................................................................................381
Chapter 30. Options........................................................................................................................................391
Chapter 31. Gotchas.......................................................................................................................................393
Chapter 32. Scripting With Style..................................................................................................................401
32.1. Unofficial Shell Scripting Stylesheet..........................................................................................401
Chapter 33. Miscellany...................................................................................................................................404
33.1. Interactive and non−interactive shells and scripts......................................................................404
33.2. Shell Wrappers............................................................................................................................405
33.3. Tests and Comparisons: Alternatives..........................................................................................409
33.4. Recursion....................................................................................................................................410
33.5. "Colorizing" Scripts....................................................................................................................412
33.6. Optimizations..............................................................................................................................425
33.7. Assorted Tips..............................................................................................................................426
33.8. Security Issues............................................................................................................................435
33.9. Portability Issues.........................................................................................................................435
33.10. Shell Scripting Under Windows...............................................................................................436
Chapter 34. Bash, versions 2 and 3...............................................................................................................437
34.1. Bash, version2.............................................................................................................................437
34.2. Bash, version 3............................................................................................................................441
Chapter 35. Endnotes.....................................................................................................................................444
35.1. Author's Note..............................................................................................................................444
35.2. About the Author........................................................................................................................444
Advanced Bash−Scripting Guide
iii
评论0