Bash Scripting
Getting Started # Bash Script Header Making Scripts Executable Putting Scripts in Your Path Style and Design Strategy # Bash Scripting Style Indentation in Bash Top-Down Design Useful Helpers # ShellCheck - just use it always Boilerplate Pure Bash Bible Variables and Constants # Variables in Bash Scoping in Bash Redirection # Here Documents 20220406080732-here-strings Functions # Functions in Bash Flow Control # if/then Constructs test Builtin Extended test File Tests Integer Comparison String Comparison Logical Operators Control Operators Looping # while until File-Redirection and Looping for Loops for: C Language Form Branching # case Exit Status # Exit Status Interactivity # read Builtin Input Validation Menus IFS # Internal Field Separator Troubleshooting # Troubleshooting Strategies Defensive Programming Verify Input Testing Debugging See also # Use Bash Strict Mode Parameters # Positional Parameters Special Parameters Basic Parameters Parameter Expansion # Parameter Expansion Manage Empty Variables Variable Name Expansion String Operations Case Modification Arithmetic Evaluation and Expansion # Arithmetic Evaluation Arithmetic Expressions Operators # Unary Operators Arithmetic Operators Assignment and Increment/Decrement Operators Bit Operations Logical and Comparison Operators Advanced Arithmetic in the Shell # See: bc Arrays # Arrays Creating Arrays Array Indexing Array Operations Associative Arrays Grouping Commands # Grouping Commands Process Substitution Traps # trap Builtin Temporary Files # Temporary Files Asynchronous Execution # wait Builtin Named Pipes # Named Pipes