Table of Content

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)

function mcd() {
	mkdir -p "$1"
	cd "$1"
}
 
source mcd.sh
mcd test

. is an alias for the source keyword