GupShup Study
 
  
Advanced Bash-Scripting Guide complete ebook for free download
Ravi Chopra

Advanced Bash-Scripting Guide complete ebook for free download

Ravi Chopra | 02-Mar-2016 |
Introduction , Basics , Beyond the Basics , Commands , Advanced Topics ,

Hi friends, here Ravi Chopra uploaded notes for Bash Scripting with title Advanced Bash-Scripting Guide complete ebook for free download. You can download this lecture notes, ebook by clicking on the below file name or icon.

Table of Contents
Advanced Bash-Scripting Guide.......................................................................................................................1
An in-depth exploration of the art of shell scripting................................................................................1
Mendel Cooper..................................................................................................................................1
Dedication............................................................................................................................................................3
Part 1. Introduction..........................................................................................................................................15
Chapter 1. Shell Programming!.......................................................................................................................17
Notes......................................................................................................................................................18
Chapter 2. Starting Off With a Sha-Bang......................................................................................................21
2.1. Invoking the script.....................................................................................................................................25
Notes......................................................................................................................................................25
2.2. Preliminary Exercises................................................................................................................................27
Part 2. Basics.....................................................................................................................................................29
Chapter 3. Special Characters.........................................................................................................................31
Notes......................................................................................................................................................50
Chapter 4. Introduction to Variables and Parameters..................................................................................53
4.1. Variable Substitution.................................................................................................................................55
Notes......................................................................................................................................................57
4.2. Variable Assignment..................................................................................................................................59
4.3. Bash Variables Are Untyped.....................................................................................................................61
4.4. Special Variable Types..............................................................................................................................63
Notes......................................................................................................................................................67
Chapter 5. Quoting...........................................................................................................................................69
5.1. Quoting Variables......................................................................................................................................71
Notes......................................................................................................................................................72
5.2. Escaping......................................................................................................................................................75
Chapter 6. Exit and Exit Status.......................................................................................................................83
Notes......................................................................................................................................................85
Chapter 7. Tests................................................................................................................................................87
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. Nested if/then Condition Tests................................................................................................................107
7.5. Testing Your Knowledge of Tests...........................................................................................................109
Chapter 8. Operations and Related Topics..................................................................................................111
8.1. Operators..................................................................................................................................................113
Notes....................................................................................................................................................119
8.2. Numerical Constants...............................................................................................................................121
8.3. The Double-Parentheses Construct........................................................................................................123
8.4. Operator Precedence...............................................................................................................................125
Notes....................................................................................................................................................127
Part 3. Beyond the Basics...............................................................................................................................129
Chapter 9. Another Look at Variables.........................................................................................................131
9.1. Internal Variables....................................................................................................................................133
Notes....................................................................................................................................................151
9.2. Typing variables: declare or typeset......................................................................................................153
9.2.1. Another use for declare..............................................................................................................155
Notes..............................................................................................................................................155
9.3. $RANDOM: generate random integer...................................................................................................157
Notes....................................................................................................................................................167
Chapter 10. Manipulating Variables.............................................................................................................169
10.1. Manipulating Strings.............................................................................................................................171
10.1.1. Manipulating strings using awk...............................................................................................178
10.1.2. Further Reference.....................................................................................................................179
Notes..............................................................................................................................................179
10.2. Parameter Substitution.........................................................................................................................181
Notes....................................................................................................................................................190
Chapter 11. Loops and Branches..................................................................................................................191
11.1. Loops.......................................................................................................................................................193
Notes....................................................................................................................................................206
11.2. Nested Loops...........................................................................................................................................207
11.3. Loop Control..........................................................................................................................................209
Notes....................................................................................................................................................212
11.4. Testing and Branching..........................................................................................................................213
Notes....................................................................................................................................................220
Chapter 12. Command Substitution.............................................................................................................221
Notes....................................................................................................................................................226
Chapter 13. Arithmetic Expansion................................................................................................................227
Chapter 14. Recess Time................................................................................................................................229
Part 4. Commands..........................................................................................................................................231
Chapter 15. Internal Commands and Builtins.............................................................................................239
15.1. Job Control Commands........................................................................................................................269
Notes....................................................................................................................................................272
Chapter 16. External Filters, Programs and Commands...........................................................................275
16.1. Basic Commands....................................................................................................................................277
Notes....................................................................................................................................................282
16.2. Complex Commands..............................................................................................................................283
Notes....................................................................................................................................................293
16.3. Time / Date Commands.........................................................................................................................295
16.4. Text Processing Commands..................................................................................................................299
Notes....................................................................................................................................................320
16.5. File and Archiving Commands.............................................................................................................321
Notes....................................................................................................................................................338
16.6. Communications Commands................................................................................................................339
Notes....................................................................................................................................................352
16.7. Terminal Control Commands...............................................................................................................353
16.8. Math Commands....................................................................................................................................355
16.9. Miscellaneous Commands.....................................................................................................................367
Notes....................................................................................................................................................379
Chapter 17. System and Administrative Commands..................................................................................381
17.1. Analyzing a System Script.....................................................................................................................409
Notes....................................................................................................................................................410
Part 5. Advanced Topics.................................................................................................................................411
Chapter 18. Regular Expressions..................................................................................................................413
18.1. A Brief Introduction to Regular Expressions......................................................................................415
Notes....................................................................................................................................................418
18.2. Globbing..................................................................................................................................................421
Notes....................................................................................................................................................422
Chapter 19. Here Documents.........................................................................................................................423
19.1. Here Strings............................................................................................................................................435
Notes....................................................................................................................................................437
Chapter 20. I/O Redirection...........................................................................................................................439
20.1. Using exec...............................................................................................................................................443
Notes....................................................................................................................................................446
20.2. Redirecting Code Blocks.......................................................................................................................447
20.3. Applications............................................................................................................................................453
Chapter 21. Subshells.....................................................................................................................................455
Notes....................................................................................................................................................459
Chapter 22. Restricted Shells.........................................................................................................................461
Chapter 23. Process Substitution...................................................................................................................463
Notes....................................................................................................................................................467
Chapter 24. Functions....................................................................................................................................469
24.1. Complex Functions and Function Complexities.................................................................................473
Notes....................................................................................................................................................483
24.2. Local Variables.......................................................................................................................................485
24.2.1. Local variables and recursion..................................................................................................486
Notes..............................................................................................................................................488
24.3. Recursion Without Local Variables.....................................................................................................491
Chapter 25. Aliases.........................................................................................................................................495
Notes....................................................................................................................................................497
Chapter 26. List Constructs...........................................................................................................................499
Chapter 27. Arrays.........................................................................................................................................503
Chapter 28. Indirect References....................................................................................................................531
Chapter 29. /dev and /proc.............................................................................................................................535
29.1. /dev..........................................................................................................................................................537
Notes....................................................................................................................................................539
29.2. /proc.........................................................................................................................................................541
Notes....................................................................................................................................................546
Chapter 30. Network Programming.............................................................................................................547
Chapter 31. Of Zeros and Nulls.....................................................................................................................551
Chapter 32. Debugging...................................................................................................................................555
Notes....................................................................................................................................................564
Chapter 33. Options........................................................................................................................................565
Chapter 34. Gotchas.......................................................................................................................................569
Notes....................................................................................................................................................577
Chapter 35. Scripting With Style..................................................................................................................579
35.1. Unofficial Shell Scripting Stylesheet....................................................................................................581
Notes....................................................................................................................................................583
Chapter 36. Miscellany...................................................................................................................................585
36.1. Interactive and non-interactive shells and scripts..............................................................................587
36.2. Shell Wrappers.......................................................................................................................................589
Notes....................................................................................................................................................593
36.3. Tests and Comparisons: Alternatives..................................................................................................595
36.4. Recursion: a script calling itself............................................................................................................597
36.5. "Colorizing" Scripts..............................................................................................................................601
Notes....................................................................................................................................................613
36.6. Optimizations.........................................................................................................................................615
Notes....................................................................................................................................................615
36.7. Assorted Tips..........................................................................................................................................617
36.7.1. Ideas for more powerful scripts...............................................................................................617
36.7.2. Widgets....................................................................................................................................627
36.8. Security Issues........................................................................................................................................631
36.8.1. Infected Shell Scripts...............................................................................................................631
36.8.2. Hiding Shell Script Source......................................................................................................631
36.8.3. Writing Secure Shell Scripts....................................................................................................631
Notes..............................................................................................................................................631
36.9. Portability Issues....................................................................................................................................633
36.9.1. A Test Suite.............................................................................................................................633
Notes..............................................................................................................................................634
36.10. Shell Scripting Under Windows.........................................................................................................635
Chapter 37. Bash, versions 2, 3, and 4..........................................................................................................637
37.1. Bash, version 2........................................................................................................................................639
37.2. Bash, version 3........................................................................................................................................645
37.2.1. Bash, version 3.1......................................................................................................................647
37.2.2. Bash, version 3.2......................................................................................................................647
37.3. Bash, version 4........................................................................................................................................649
37.3.1. Bash, version 4.1......................................................................................................................655
37.3.2. Bash, version 4.2......................................................................................................................657
Notes..............................................................................................................................................659
Chapter 38. Endnotes.....................................................................................................................................661
38.1. Author's Note.........................................................................................................................................663
Notes....................................................................................................................................................663
38.2. About the Author...................................................................................................................................665
Notes....................................................................................................................................................665
38.3. Where to Go For Help...........................................................................................................................667
Notes....................................................................................................................................................667
38.4. Tools Used to Produce This Book.........................................................................................................669
38.4.1. Hardware..................................................................................................................................669
38.4.2. Software and Printware............................................................................................................669
38.5. Credits.....................................................................................................................................................671
38.6. Disclaimer...............................................................................................................................................673

    Attachment Lists

    If download doesn't start in application like IDM then press Alt + click on download button to start download
  • abs-guide.pdf (Size: 2584.78KB) Dowland
Share With Friends :  

No any Comment yet!