More Ebooks:

Adobe Premiere 6 Bible

Adobe After Effects 5 Bible

ADO.NET in a Nutshell

ADO .NET Programming

Administering and Securing the Apache Server

Adapt or Die - Transforming Your Supply Chain into an Adaptive Business Network

Active Directory, Second Edition

Active Directory Cookbook for Windows Server 2003 and Windows 2000

Active Directory Bible

ActionScripting in Macromedia Flash MX

find on eBook ToC:


,

ISBN:, Edition: ,

Price: -

Table of Contents

Chapter 1. Why Shell Programming? ~ 1

Chapter 2. Starting Off With a Sha-Bang ~ 3
2.1. Invoking the script ~ 5
2.2. Preliminary Exercises ~ 6
Part 2. Basics ~ 6

Chapter 3. Exit and Exit Status ~ 7

Chapter 4. Special Characters ~ 9

Chapter 5. Introduction to Variables and Parameters ~ 23
5.1. Variable Substitution ~ 23
5.2. Variable Assignment ~ 25
5.3. Bash Variables Are Untyped ~ 26
5.4. Special Variable Types ~ 27

Chapter 6. Quoting ~ 31

Chapter 7. Tests ~ 37
7.1. Test Constructs ~ 37
7.2. File test operators ~ 42
7.3. Comparison operators (binary) ~ 45
7.4. Nested if/then Condition Tests ~ 50
7.5. Testing Your Knowledge of Tests ~ 51

Chapter 8. Operations and Related Topics ~ 52
8.1. Operators ~ 52
8.2. Numerical Constants ~ 58
Part 3. Beyond the Basics ~ 58

Chapter 9. Variables Revisited ~ 60
9.1. Internal Variables ~ 60
9.2. Manipulating Strings ~ 75
9.3. Parameter Substitution ~ 79
9.4. Typing variables: declare or typeset ~ 87
9.5. Indirect References to Variables ~ 88
9.6. $RANDOM: generate random integer ~ 90
9.7. The Double Parentheses Construct ~ 94

Chapter 10. Loops and Branches ~ 96
10.1. Loops ~ 96
10.2. Nested Loops ~ 106
10.3. Loop Control ~ 106
10.4. Testing and Branching ~ 109

Chapter 11. Internal Commands and Builtins ~ 115
11.1. Job Control Commands ~ 130

Chapter 12. External Filters, Programs and Commands ~ 134
12.1. Basic Commands ~ 134
12.2. Complex Commands ~ 137
12.3. Time / Date Commands ~ 143
12.4. Text Processing Commands ~ 145
12.5. File and Archiving Commands ~ 162
12.6. Communications Commands ~ 170
12.7. Terminal Control Commands ~ 173
12.8. Math Commands ~ 174
12.9. Miscellaneous Commands ~ 177

Chapter 13. System and Administrative Commands ~ 184

Chapter 14. Command Substitution ~ 206

Chapter 15. Arithmetic Expansion ~ 209

Chapter 16. I/O Redirection ~ 210
16.1. Using exec ~ 212
16.2. Redirecting Code Blocks ~ 212
16.3. Applications ~ 216

Chapter 17. Here Documents ~ 218

Chapter 18. Recess Time ~ 223
Part 4. Advanced Topics ~ 223

Chapter 19. Regular Expressions ~ 225
19.1. A Brief Introduction to Regular Expressions ~ 225
19.2. Globbing ~ 227

Chapter 20. Subshells ~ 229

Chapter 21. Restricted Shells ~ 232

Chapter 22. Process Substitution ~ 234

Chapter 23. Functions ~ 236
23.1. Complex Functions and Function Complexities ~ 238
23.2. Local Variables and Recursion ~ 245

Chapter 24. Aliases ~ 247

Chapter 25. List Constructs ~ 250

Chapter 26. Arrays ~ 253

Chapter 27. Files ~ 264

Chapter 28. /dev and /proc ~ 265
28.1. /dev ~ 265
28.2. /proc ~ 265

Chapter 29. Of Zeros and Nulls ~ 270

Chapter 30. Debugging ~ 273

Chapter 31. Options ~ 279

Chapter 32. Gotchas ~ 282

Chapter 33. Scripting With Style ~ 286
33.1. Unofficial Shell Scripting Stylesheet ~ 286

Chapter 34. Miscellany ~ 289
34.1. Interactive and non-interactive shells and scripts ~ 289
34.2. Shell Wrappers ~ 290
34.3. Tests and Comparisons: Alternatives ~ 293
34.4. Optimizations ~ 294
34.5. Assorted Tips ~ 294
34.6. Oddities ~ 297
34.7. Portability Issues ~ 298

Chapter 35. Bash, version 2 ~ 299

Chapter 36. Endnotes ~ 303
36.1. Author's Note ~ 303
36.2. About the Author ~ 303
36.3. Tools Used to Produce This Book ~ 303
36.3.1. Hardware ~ 303
36.3.2. Software and Printware ~ 303
36.4. Credits ~ 304

Bibliography ~ 305

Appendix A. Contributed Scripts ~ 309

Appendix B. A Sed and Awk Micro-Primer ~ 327
B.1. Sed ~ 327
B.2. Awk ~ 329

Appendix C. Exit Codes With Special Meanings ~ 330

Appendix D. A Detailed Introduction to I/O and I/O Redirection ~ 332

Appendix E. Localization ~ 333

Appendix F. A Sample .bashrc File ~ 335

Advanced Bash-Scripting Guide