
Explore how to declare and use variables in bash scripts, including environment variables, user defined variables, readonly mode, and accessing values with dollar signs, plus reading input and creating files.
Explore how to use comparison operators in shell scripting to test variables, strings, and conditions, and learn how equal, not equal, greater than, and less than guide decision making.
Explore conditional statements using if and else, not equal to operator, and case structures to execute code blocks based on conditions, with nested conditions and user input.
Explore bash loop statements: while, for, and until; control flow with break and continue, iterate with arrays and echo, and build infinite or user-driven loops.
Learn how positional arguments pass values to a shell script, access them with $1 and $2, and understand shell parameters, variables, and predefined special parameters.
Explore exit codes of shell commands, where 0 means success and non-zero signals failure, and learn to view, set, and use them in scripts with $?.
Explore here documents in shell scripting by passing multi-line strings to commands with a delimiter token and ending input on its own line using cat, wc, or sort.
Learn how to create and use functions in shell scripts, return values, pass different arguments, and build abstractions like a backup function that copies a directory to a destination.
Learn to pass and parse Linux shell script arguments with positional and named options, using getopts and shift to iterate and validate parameters.
An Operating System consists of many components, but its two main components are: Kernel and Shell.
What is Kernel?
Kernel; It enables communication between hardware and software. Kernel is the innermost part of an operating system. It is responsible for managing all of the system's resources, such as the CPU, memory, and storage. The kernel also provides a set of system calls that allow user-mode programs to interact with the hardware.
What is Shell?
Shell is a program that lets you interact with your computer's operating system. It takes the commands you type in and turns them into instructions that the operating system can understand.
What is Shell Script?
Shell Script is an open-source computer program designed to be run by the Unix/Linux shell program. Shell scripts allow us to write down a sequence of shell commands in a file and then execute them all at once. This can save us a lot of time and effort, especially if we need to run the same commands regularly.
With this course, we will see the basics of writing shell scripts in this command sequence. Now let's take a look at the contents of Shell Scripting Essentials:
Variables
Comparison Operators
Conditional Statements
Loops
Positional Arguments
Storing Output of Command
Exit Codes of Commands
Redirection
Here Document
Piping
Functions
Parse Script Arguments and Parameters
File Operations
Grep Command
Aliases
Wait Command
Signal Handling
Debugging
Regex
Sed Command
Examples