ENGLISH

Mastering Bash: Automate Daily Tasks with Bash

Book information

Publisher
Packt Publishing
Year
2017
ISBN
9781784396879
Language
english
Format
PDF
Filesize
54 MB (56373179 bytes)
Pages
496\496
Time added
2019-03-09 09:42:45

Description

System administration is an everyday effort that involves a lot of tedious tasks, and devious pits. Knowing your environment is the key to unleashing the most powerful solution that will make your life easy as an administrator, and show you the path to new heights. Bash is your Swiss army knife to set up your working or home environment as you want, when you want. Cover......Page 1 Copyright......Page 3 Credits......Page 4 About the Author......Page 5 About the Reviewer......Page 6 www.PacktPub.com......Page 7 Customer Feedback......Page 8 Table of Contents......Page 9 Preface......Page 15 Chapter 1: Let's Start Programming......Page 22 I/O redirection......Page 26 Messing around with stdin, stdout, and stderr......Page 31 Time for the interpreter: the sha-bang......Page 34 Calling your script......Page 36 Something went wrong, let's trace it......Page 42 Variables......Page 45 Assigning a variable......Page 46 Keep the variable name safe......Page 47 Variables with limited scope......Page 48 Environment variables......Page 50 Variable expansion......Page 58 Pattern matching against variables......Page 63 Special variables......Page 68 Summary......Page 73 Arithmetic operators......Page 74 The + operator......Page 75 The % operator......Page 76 The += operator......Page 77 The *= operator......Page 78 The %= operator......Page 79 The ++ or -- operators......Page 80 Left shift ()......Page 83 Bitwise AND......Page 84 Bitwise NOT (~)......Page 85 Logical NOT (!)......Page 87 Logical AND......Page 88 Logical OR (||)......Page 89 Comma operator (,)......Page 90 Exit codes......Page 91 Exiting a script......Page 94 Summary......Page 97 What if...else......Page 98 Test command recap......Page 106 Testing files......Page 107 Testing integers......Page 125 Testing strings......Page 132 More on tests......Page 138 Summary......Page 140 Chapter 4: Quoting and Escaping......Page 141 The hash character (#)......Page 142 The semicolon character (;)......Page 143 The double semicolon character (;;)......Page 144 The dot character (.)......Page 145 The comma character (,)......Page 151 The ^^ and ^ () case modificators......Page 152 The colon character (:)......Page 154 Keywords......Page 155 The asterisk (*)......Page 156 Test operators (?)......Page 158 The substitution ($)......Page 160 The positional parameters ($* and $......Page 161  Grouping the command (command1 ; command2 ; commandn)......Page 162 Expression ([])......Page 165 Characters range ([])......Page 166 The here document (

Similar books