Table of Content
- Bash Variables
- Bash User Input
- Bash Special Symbols
- Bash Conditional Statements
- Bash Iteration Statements
- Bash Arrays
- Bash Functions
- Bash File Operations
Input Stream : Into to the shell (<)
Output Stream : Output from the shell (> / >>)
Error Stream : Error from an program (2>)
Pipe Operator : Take the output from the left and make it the input for the right (|)
Bash Flags
-x
: Verbose Mode
-e
: If Error exit Code
-u
: Exit if an Unbound variable is accessed
-o pipefail
: Exit script if error in pipeline (Commands changed using |
)
Operators
Unix / Linux - Shell Basic Operators
Double Parenthesis : Arithmetic Operations
Single Brackets : Test/ Comparison Operations
Double Brackets : Test/ Comparison Operations with additional features
BASH Scripting: Parenthesis Explained - Linux Tutorials - Learn Linux Configuration
Source Command
The source command is used to load code/ function into the shell (Similar to importing packages)
.
is an alias for the source keyword