Documents

1,038 pages
59 views

Advanced Bash Scripting Guide

of 1038
All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.
Share
Description
Advanced Bash scripting guide
Transcript
  Advanced Bash-Scripting Guide  Table of Contents Advanced Bash-Scripting Guide.......................................................................................................................1 An in-depth exploration of the art of shell scripting................................................................................1Mendel Cooper..................................................................................................................................1 Dedication............................................................................................................................................................3Part 1. Introduction..........................................................................................................................................15Chapter 1. Shell Programming!.......................................................................................................................17 Notes......................................................................................................................................................18 Chapter 2. Starting Of f With a Sha-Bang......................................................................................................212.1. Invoking the script.....................................................................................................................................25 Notes......................................................................................................................................................25 2.2. Preliminary Exercises................................................................................................................................27Part 2. Basics.....................................................................................................................................................29Chapter 3. Special Characters.........................................................................................................................31 Notes......................................................................................................................................................51 Chapter 4. Introduction to Variables and Parameters..................................................................................534.1. Variable Substitution.................................................................................................................................55 Notes......................................................................................................................................................57 4.2. Variable Assignment..................................................................................................................................594.3. Bash Variables Are Untyped.....................................................................................................................614.4. Special Variable Types..............................................................................................................................63 Notes......................................................................................................................................................67 Chapter 5. Quoting...........................................................................................................................................695.1. Quoting Variables......................................................................................................................................71 Notes......................................................................................................................................................73 5.2. Escaping......................................................................................................................................................75Chapter 6. Exit and Exit Status.......................................................................................................................83 Notes......................................................................................................................................................85 Chapter 7. Tests................................................................................................................................................87 Advanced Bash-Scripting Guidei  Table of Contents 7.1. Test Constructs...........................................................................................................................................89 Notes......................................................................................................................................................96 7.2. File test operators.......................................................................................................................................97 Notes....................................................................................................................................................100 7.3. Other Comparison Operators.................................................................................................................101 Notes....................................................................................................................................................106 7.4. Nestedif/then Condition Tests................................................................................................................1077.5. Testing Your Knowledge of Tests...........................................................................................................109Chapter 8. Operations and Related Topics..................................................................................................1118.1. Operators..................................................................................................................................................113 Notes....................................................................................................................................................119 8.2. Numerical Constants...............................................................................................................................1218.3. The Double-Parentheses Construct........................................................................................................1238.4. Operator Precedence...............................................................................................................................125 Notes....................................................................................................................................................127 Part 3. Beyond the Basics...............................................................................................................................129Chapter 9. Another Look at Variables.........................................................................................................1319.1. Internal Variables....................................................................................................................................133 Notes....................................................................................................................................................151 9.2. Typing variables: declare or typeset......................................................................................................153 9.2.1. Another use for declare..............................................................................................................155Notes..............................................................................................................................................155 9.3. $RANDOM: generate random integer...................................................................................................157 Notes....................................................................................................................................................168 Chapter 10. Manipulating Variables.............................................................................................................16910.1. Manipulating Strings.............................................................................................................................171 10.1.1. Manipulating strings using awk...............................................................................................17810.1.2. Further Reference.....................................................................................................................179Notes..............................................................................................................................................179 Advanced Bash-Scripting Guideii
We Need Your Support
Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

Thanks to everyone for your continued support.

No, Thanks
SAVE OUR EARTH

We need your sign to support Project to invent "SMART AND CONTROLLABLE REFLECTIVE BALLOONS" to cover the Sun and Save Our Earth.

More details...

Sign Now!

We are very appreciated for your Prompt Action!

x