Example: biology

Advanced Bash-Scripting Guide - newkis.fmi.uni …

Advanced Bash-Scripting GuideAdvanced Bash-Scripting GuideA complete Guide to shell scripting , using Bash03 September 2001 Mendel is an major update of version The main feature of this release is a major reorganization of the document into parts and chapters (just like a "real" book). Of course, more bugs have been swatted, and additional material and example scripts added. This project has now reached the equivalent of a 360-page book. See the file for a revision document is both a tutorial and a reference on shell scripting with bash . It assumes no previous knowledge of scripting or programming, but progresses rapidly toward an intermediate/ Advanced level of instruction. [1] The exercises and heavily-commented examples invite active reader project has evolved into a comprehensive book that compares favorably with any of the shell scripting manuals in print.

Advanced Bash-Scripting Guide Advanced Bash-Scripting Guide A complete guide to shell scripting, using Bash 03 September 2001 Mendel Cooper Brindlesoft

Tags:

  Guide, Advanced, Bash, Scripting, Advanced bash scripting guide, Advanced bash scripting guide advanced bash scripting guide

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Advertisement

Transcription of Advanced Bash-Scripting Guide - newkis.fmi.uni …

1 Advanced Bash-Scripting GuideAdvanced Bash-Scripting GuideA complete Guide to shell scripting , using Bash03 September 2001 Mendel is an major update of version The main feature of this release is a major reorganization of the document into parts and chapters (just like a "real" book). Of course, more bugs have been swatted, and additional material and example scripts added. This project has now reached the equivalent of a 360-page book. See the file for a revision document is both a tutorial and a reference on shell scripting with bash . It assumes no previous knowledge of scripting or programming, but progresses rapidly toward an intermediate/ Advanced level of instruction. [1] The exercises and heavily-commented examples invite active reader project has evolved into a comprehensive book that compares favorably with any of the shell scripting manuals in print.

2 It may serve as a textbook, a manual for self-study, and a reference and source of knowledge on shell scripting latest version of this document, as an archived "tarball" including both the SGML source and rendered HTML, may be downloaded from the author's home Anita, the source of all the magicTable of ContentsPart 1. Introductionfile:///D|/Documents/Linux/B ooks/advanced_bash_scripting/ (1 of 10) [9/15/2001 10:04:28 PM] Advanced Bash-Scripting Guide1. Why Shell Programming?2. Starting Off With a Invoking the Shell wrapper, self-executing scriptPart 2. Basics3. Exit and Exit Status4. Special Characters41 Special Characters Found In Scripts and Elsewhere5. Introduction to Variables and Variable Variable Special Variable Types6. Quoting61 Special meanings of certain escaped characters7.

3 Test File test Comparison operators (binary) Nested if/then Condition Tests8. Operations and Related Numerical ConstantsPart 3. Beyond the Basics9. Variables Internal Parameter Typing variables: declare or Indirect References to $RANDOM: generate random The Double Parentheses Construct10. Loops and Nested Loop Testing and Branching11. Internal Commands and Builtins111I/O112 Filesystem113 Variablesfile:///D|/Documents/Linux/Book s/advanced_bash_scripting/ (2 of 10) [9/15/2001 10:04:28 PM] Advanced Bash-Scripting Guide114 Script Job Control Commands12. External Filters, Programs and Basic Complex Time / Date Text Processing File and Archiving Communications Terminal Control Math Miscellaneous Commands13.

4 System and Administrative Commands131 Users and Groups132 Terminals133 Information and Statistics134 System Logs135 Job Control136 Process Control and Booting137 Network138 Filesystem139 Backup1310 System Resources1311 Modules1312 Miscellaneous14. Command Substitution15. Arithmetic Expansion151 Variations16. I/O Redirection161 Closing File Using Redirecting Code Applications17. Here Documents18. Recess TimePart 4. Advanced Topics19. Regular A Brief Introduction to Regular Globbingfile:///D|/Documents/Linux/Books /advanced_bash_scripting/ (3 of 10) [9/15/2001 10:04:28 PM] Advanced Bash-Scripting Guide20. Subshells201 Command List in Parentheses21. Restricted Shells211 Disabled commands in restricted shells22. Process Substitution221 Command substitution template23.

5 Complex Functions and Function Local Variables and Recursion24. Aliases25. List Constructs251 Chaining together commands26. Arrays27. Files271startup files272logout file28. /dev and /proc29. Of Zeros and Nulls291/dev/zero and /dev/null30. Debugging301 Trapping signals31. Options32. Gotchas33. scripting With Unofficial Shell scripting Stylesheet34. Interactive and non-interactive shells and Tests and Assorted Portability Issues35. bash , version 236. Credits37. Author's About the Tools Used to Produce This Software and PrintwareBibliographyfile:///D|/Document s/Linux/Books/advanced_bash_scripting/ (4 of 10) [9/15/2001 10:04:28 PM] Advanced Bash-Scripting GuideA. Contributed ScriptsB. A Sed and Awk AwkC. Exit Codes With Special MeaningsD.

6 A Detailed Introduction to I/O and I/O RedirectionE. LocalizationF. A Sample .bashrc FileG. Converting DOS Batch Files to Shell ScriptsH. CopyrightList of Tables11-1. Job Identifiers31-1. bash optionsB-1. Basic sed operatorsB-2. ExamplesC-1. "Reserved" Exit CodesG-1. Batch file keywords / variables / operators, and their shell equivalentsG-2. DOS Commands and Their UNIX EquivalentsList of Examples2-1. cleanup: A script to clean up the log files in /var/log2-2. cleanup: An enhanced and generalized version of above shell wrapper2-4. A slightly more complex shell wrapper2-5. A shell wrapper around an awk script2-6. Perl embedded in a bash script3-1. exit / exit status3-2. Negating a condition using !4-1. Code blocks and I/O redirection4-2. Saving the results of a code block to a file4-3.

7 Backup of all files changed in last day5-1. Variable assignment and substitution5-2. Plain Variable Assignment5-3. Variable Assignment, plain and fancy5-4. Positional Parameters5-5. wh, whois domain name lookup5-6. Using shift6-1. Echoing Weird Variablesfile:///D|/Documents/Linux/Book s/advanced_bash_scripting/ (5 of 10) [9/15/2001 10:04:28 PM] Advanced Bash-Scripting Guide6-2. Escaped Characters7-1. What is truth?7-2. Equivalence of [ ] and test7-3. Arithmetic Tests using (( ))7-4. arithmetic and string comparisons7-5. testing whether a string is null7-6. zmost8-1. Using Arithmetic Operations8-2. Compound Condition Tests Using && and ||8-3. Representation of numerical constants:9-1. $IFS and whitespace9-2. Timed Input9-3. Once more, timed input9-4.

8 Am I root?9-5. underscore variable9-6. arglist: Listing arguments with $* and Inconsistent $* and $@ behavior9-8. $* and $@ when $IFS is empty9-9. Using param substitution and :9-10. Length of a variable9-11. Pattern matching in parameter substitution9-12. Renaming file extensions:9-13. Using pattern matching to parse arbitrary strings9-14. Matching patterns at prefix or suffix of string9-15. Using declare to type variables9-16. Indirect References9-17. Passing an indirect reference to awk9-18. Generating random numbers9-19. Rolling the die with RANDOM9-20. Reseeding RANDOM9-21. C-type manipulation of variables10-1. Simple for loops10-2. for loop with two parameters in each [list] element10-3. Fileinfo: operating on a file list contained in a variable10-4.

9 Operating on files with a for loop10-5. Missing in [list] in a for loop10-6. Generating the [list] in a for loop with command substitution10-7. A grep replacement for binary filesfile:///D|/Documents/Linux/Books/ad vanced_bash_scripting/ (6 of 10) [9/15/2001 10:04:28 PM] Advanced Bash-Scripting Guide10-8. Checking all the binaries in a directory for authorship10-9. Listing the symbolic links in a directory10-10. A C-like for loop10-11. Using efax in batch mode10-12. Simple while loop10-13. Another while loop10-14. while loop with multiple conditions10-15. C-like syntax in a while loop10-16. until loop10-17. Nested Loop10-18. Effects of break and continue in a loop10-19. Breaking out of multiple loop levels10-20. Continuing at a higher loop level10-21.

10 Using case10-22. Creating menus using case10-23. Using command substitution to generate the case variable10-24. Checking for alphabetic input10-25. Creating menus using select10-26. Creating menus using select in a function11-1. printf in action11-2. Variable assignment, using read11-3. Multi-line input to read11-4. Using read with file redirection11-5. Changing the current working directory11-6. Letting let do some Showing the effect of eval11-8. Forcing a log-off11-9. A version of "rot13"11-10. Using set with positional parameters11-11. "unsetting" a variable11-12. Using export to pass a variable to an embedded awk script11-13. Using getopts to read the options/arguments passed to a script11-14. "Including" a data file11-15. Effects of exec11-16.


Related search queries