Transcription of Advanced Bash-Scripting Guide - DMCS
1 Advanced Bash-Scripting GuideTable of ContentsAdvanced Bash-Scripting in-depth exploration of the art of shell 1. 1. Shell Programming!.. 2. Starting Off With a Invoking the Preliminary 2. 3. Special 4. Introduction to Variables and Variable Variable bash Variables Are Special Variable 5. Quoting 6. Exit and Exit 7. Bash-Scripting GuideiTable of Test File test Other Comparison Nestedif/then Condition Testing Your Knowledge of 8. Operations and Related Numerical The Double-Parentheses Operator 3. Beyond the 9.
2 Another Look at Internal Typing variables: declare or Another use for $RANDOM: generate random 10. Manipulating Manipulating Manipulating strings using Further Bash-Scripting GuideiiTable of Parameter 11. Loops and Nested Loop Testing and 12. Command 13. Arithmetic 14. Recess 4. 15. Internal Commands and Job Control 16. External Filters, Programs and Basic Complex Time / Date Text Processing File and Archiving Communications Bash-Scripting GuideiiiTable of Terminal Control Math Miscellaneous 17. System and Administrative Analyzing a System 5.
3 Advanced 18. Regular A Brief Introduction to Regular 19. Here Here 20. I/O Using Redirecting Code 21. 22. Restricted 23. Process 24. Complex Functions and Function Bash-Scripting GuideivTable of Local Local variables and Recursion Without Local 25. 26. List 27. 28. Indirect 30. Of Zeros and 31. 32. 33. 34. scripting With Unofficial Shell scripting 35. Interactive and non-interactive shells and Shell Tests and Comparisons: Bash-Scripting GuidevTable of A script calling itself (recursion).. "Colorizing" Assorted Ideas for more powerful Security Infected Shell Hiding Shell Script Writing Secure Shell Portability A Test Shell scripting Under 36.
4 bash , versions 2, 3, and bash , version bash , version bash , version bash , version bash , version 37. Author's About the Where to Go For Bash-Scripting GuideviTable of Tools Used to Produce This Software and A. Contributed B. Reference C. A Sed and Awk D. Exit Codes With Special E. A Detailed Introduction to I/O and I/O F. Command-Line Standard Command-Line bash Command-Line G. Important H. Important System I. An Introduction to Programmable J. K. History Bash-Scripting GuideviiTable of ContentsAppendix L. A M.
5 Converting DOS Batch Files to Shell N. Analyzing Writing O. Revision P. Download and Mirror Q. To Do R. S. ASCII Bash-Scripting GuideviiiAdvanced Bash-Scripting GuideAn in-depth exploration of the art of shell scriptingVersion May 2010 Mendel tutorial assumes no previous knowledge of scripting or programming, but progresses rapidly toward anintermediate/ Advanced level of instruction .. all the while sneaking in little nuggets of UNIX wisdom andlore. It serves as a textbook, a manual for self-study, and a reference and source of knowledge on shellscripting techniques.
6 The exercises and heavily-commented examples invite active reader participation, underthe premise that the only way to really learn scripting is to write book is suitable for classroom use as a general introduction to programming Anita, the source of all the magicTable of ContentsPart 1. Introduction1. Shell Programming!2. Starting Off With a Invoking the Preliminary ExercisesPart 2. Basics3. Special Characters4. Introduction to Variables and Variable Variable bash Variables Are Special Variable Types5. Quoting Escaping6. Exit and Exit Status7. Test File test Other Comparison Nestedif/then Condition Testing Your Knowledge of Tests8.
7 Operations and Related Numerical The Double-Parentheses Operator PrecedencePart 3. Beyond the Basics9. Another Look at Internal Typing variables: declare or $RANDOM: generate random integer10. Manipulating Manipulating Parameter Substitution11. Loops and Nested Loop Testing and Branching12. Command Substitution13. Arithmetic Expansion14. Recess TimePart 4. Commands15. Internal Commands and Job Control Commands16. External Filters, Programs and Basic Complex Time / Date Text Processing File and Archiving Communications Terminal Control Math Miscellaneous Commands17.
8 System and Administrative Analyzing a System ScriptPart 5. Advanced Topics18. Regular A Brief Introduction to Regular Globbing19. Here Here Strings20. I/O Using Redirecting Code Applications21. Subshells22. Restricted Shells23. Process Substitution24. Complex Functions and Function Local Recursion Without Local Variables25. Aliases26. List Constructs27. Arrays28. Indirect References29. /dev /proc30. Of Zeros and Nulls31. Debugging32. Options33. Gotchas34. scripting With Unofficial Shell scripting Stylesheet35. Interactive and non-interactive shells and Shell Tests and Comparisons: A script calling itself (recursion) "Colorizing" Assorted Security Portability Shell scripting Under Windows36.
9 bash , versions 2, 3, and bash , version bash , version bash , version 437. Author's About the Where to Go For Tools Used to Produce This Software and DisclaimerBibliographyA. Contributed ScriptsB. Reference CardsC. A Sed and Awk AwkD. Exit Codes With Special MeaningsE. A Detailed Introduction to I/O and I/O RedirectionF. Command-Line Standard Command-Line bash Command-Line OptionsG. Important FilesH. Important System DirectoriesI. An Introduction to Programmable CompletionJ. LocalizationK. History CommandsL. A FileM. Converting DOS Batch Files to Shell ScriptsN.
10 Analyzing Writing ScriptsO. Revision HistoryP. Download and Mirror SitesQ. To Do ListR. CopyrightS. ASCII TableIndexList of Tables8-1. Operator Precedence15-1. Job identifiers32-1. bash options35-1. Numbers representing colors in Escape SequencesB-1. Special Shell VariablesB-2. TEST Operators: Binary ComparisonB-3. TEST Operators: FilesB-4. Parameter Substitution and ExpansionB-5. String OperationsB-6. Miscellaneous ConstructsC-1. Basic sed operatorsC-2. Examples of sed operatorsD-1. Reserved Exit CodesM-1. Batch file keywords / variables / operators, and their shell equivalentsM-2.
