
discover how to use bash to automate repetitive linux tasks by writing shell scripts that run sequences of commands, check tool versions, and schedule tasks.
Gain basic knowledge of linux, unix, or macos and their commands, plus familiarity with vi or vim, and practice on CentOS or another linux/unix os to use mailx.
Learn Bash shell scripting for automation and discover who can enroll, including users on Linux, Unix, or Mac OS servers.
Download the zip file, unzip it, and extract the required documents to your preferred location; open the bash shell scripting folder to access section-based folders with documents and scripts.
Set up a practice environment for bash scripting across Unix, Linux, and Mac OS by installing locally, via cloud, or with WSL, including deploying CentOS on Windows and enabling systemctl.
Enable Windows Subsystem for Linux, install Ubuntu from the Microsoft Store, verify with wsl -v, then install CentOS by downloading its image, extracting, and running the installer as administrator.
Enable systemctl on WSL CentOS by updating PowerShell and CentOS, then create /etc/w.conf and add two lines. Restart the interface and verify by installing httpd and checking systemctl status.
Obtain your Gmail id and app password, enable two-step verification, and configure Gmail setup on CentOS using postfix and mailx for CentOS 7 or CentOS 9.
Access Windows files from CentOS in WSL and manage Windows drives from Linux by using the /mnt path, listing drives, and creating files that appear across both systems.
Learn the basic steps to write and execute a Bash script, including defining requirements, locating Bash with which, adding a shebang, and running commands like Java version and Docker version.
Learn to run bash scripts by using a shebang line and execution permissions, then execute with dot slash or a full path, and understand the difference from scripts without these features.
Learn to run a CentOS terminal inside Visual Studio Code to execute commands and shell scripts via Bash, and manage WSL distributions to use CentOS as the default.
Learn how chmod may not work by default on WSL Linux and fix it by editing /etc/fstab to enable automount with metadata, then restart your Linux instance.
Install Docker, Ansible, Nginx, httpd, and Java with a Bash script on CentOS, then verify versions and commands for hands-on practice.
Learn how shell scripts run line by line, guided by the shebang to select the right interpreter, with examples showing Java and Docker version commands, sleep delays, and math calculations.
Learn how to use semicolons to separate multiple commands in bash shell scripts, writing and running one-line sequences that still execute as separate commands with optional sleep delays.
Explore how bash shell scripting uses variables to store numbers, strings, paths, and command output, and learn to declare, assign, and reference them with $ and ${}.
Explore how a bash variable defaults to empty, how to reassign values, and how the unset command clears a variable, with scope limited to the shell script.
Learn the three types of variables in shell scripting: user defined, system defined, and special variables, with examples of user, root, and hostname and notes on avoiding capitalized user variables.
Define bash variables by rules: use letters, numbers, and underscores, avoid spaces, not start with a number, keep under 20 characters, quote values with spaces and use $(command) for outputs.
Explore the syntax of bash shell scripting, including variable definition and echo display. Learn the rules: no spaces around =, valid variable names, and quoting for strings to avoid errors.
Explore inputs and outputs for bash shell variables, including defining values, read, source, export, command line arguments, and while loops for inputs, plus echo, cat, and printf for outputs.
Master echo command usage in bash scripts, covering syntax and options (-e, -E), printing empty lines, and combining strings, variables (with braces), wildcards, and command output with proper quoting.
Learn bash shell scripting with variables and the echo command to capture Docker and Ansible versions and present them in a formatted, pipeline-style output.
Create a soft link from your Linux home to a Windows drive path, enabling access to Windows files from any WSL user, including root, so Linux and Windows share scripts.
Demonstrate echo command options in Bash, covering default behavior, -n to suppress new lines, and -e to interpret escape sequences, with practical examples of line breaks and tabs in scripts.
Learn how to produce colored output in bash scripts using echo -e, pass color codes to display strings in blue or other colors, and reset to default color.
Use the read command to capture input into variables, with prompts, password masking, escaping preserved, and control field splitting with IFS.
Use the source command to load variables from a file into the current shell, enabling scripts to access defined values like docker and ansible tools.
Learn how the export command makes shell variables global across subshells, enabling them in environment variables and scripts, with syntax like export VAR=value; verify with export -p.
Learn how to provide inputs to bash scripts via command line arguments, access them with positional parameters like $1, $2, and use curly braces for multi-digit indexes.
Explore how the shift command moves command-line arguments to the left in bash scripts, how dollar positions update after shifting, and how to manage script arguments with examples.
Explore basic operations on strings in bash, including string length, concatenation, case conversion, slicing, and substring replacement using cut, transfer, and set substitute techniques.
Learn to use dir name to strip suffixes after the last slash and base name to extract the final path element from file or directory paths.
Learn how bash arrays store multiple values in a single variable using indexed arrays and declare -a. Values are space separated; quotes handle spaces and mixed data types.
Access and modify bash arrays by index (zero-based), retrieve single or all values with ${array[index]} and ${array[@]}, measure length with ${#array[@]}, and manage overwriting, appending, and deleting.
Discover why arrays store multiple tool names and versions in one variable, replacing many variables with a single DevOps tools info array and showing when to use arrays.
Declare and populate bash arrays directly or from command line arguments, and manage input with IFS, including colon-based splitting and restoring the old IFS.
Learn how bash dictionaries (associative arrays) store values by custom keys, declare with declare -A, access by key, and modify with add, delete, and print operations.
Learn how bash commands return an exit status and how to capture it with $?, where 0 means success and non-zero signals failure. Apply this in conditional statements.
Learn to use redirection operators and file descriptors for standard input, output, and error, including <, <<<, >, >>, and 0, 1, 2 for routing data and logs.
Store a command itself in a variable and execute it via that variable, using the complete path when needed, with examples using ls and date, and handling cron jobs.
Learn to extract specific columns with the cut command by choosing a delimiter (default tab) and selecting fields with -f and -d options, from files, strings, or pipelines.
Learn to extract specific fields or lines with awk using custom delimiters, -F, and field variables like $1, $2, or $NF to print exact data.
Learn to use grep to filter lines from files or command output, mastering options like -i, -w, -n, -v, and -l, with -E and -e for precise matches.
Store the search string in a variable and use it in grep; enable variable expansion with double quotes, and avoid it with single quotes, as shown with /etc/passwd.
Learn to use sed, the stream editor, to edit and display data, print lines by number with -n, search with patterns like grep, and incorporate variables with double quotes.
Learn to perform sed find and replace with the set command, using in-place edits with -i, backups, single-character delimiters, and variables in replacements.
Learn to insert and delete lines with sed using line numbers or search strings, including before or after a line, appending after the last line, and in‑place editing.
Learn to use tr to translate lowercase to uppercase and other replacements, filter processes with grep -v grep, parse pids with arc command and cut, then kill -9.
Learn to perform arithmetic in bash for integers and floating point numbers using parentheses and bash calculator (bc), including reading inputs, storing results, and handling division by zero.
Learn to combine multiple commands using command chaining operators, including the pipe, semicolon, logical and operator, and logical or operator for concise shell scripts.
Learn how to chain commands with the pipe operator to pass output as input, redirect errors to stdout, then filter with cut and store results in a variable.
Learn to chain multiple commands in one line with the semicolon operator, executing independent commands in sequence, and even define and display variables on shell scripts and the command line.
Master bash command chaining with and, or, and their combination as if-else logic. See how commands run only on success or failure, with Nginx checks and engine x installations.
Learn how to locate the full path of any command or installed package in Linux by using the which command and the built-in command -v, with practical examples.
Write a bash script that reads a package name as a command line argument and prints its path or 'not found' if absent, using command -v and logical operators.
Discover how to create a block of code with curly braces in bash, turning multiple commands into a single line. Learn semicolon separation and logical and for controlled execution.
Learn to write a simple Bash shell script that uses curly braces to group commands, checks for nc command, installs if missing, and extracts the version using cut.
Learn to retrieve the latest file or directory from the current location using tail -1 and create an alias to simplify the command.
This unique course is designed to become an expert in bash shell scripting to automate repetitive tasks.
As we know that most of the organizations are moving into Linux and Unix operating system as its generally open source. Additionally, Linux, Unix skills gained by developers would make them more in demand.
From a developer perspective, this course not only cover command line commands, but also Bash shell scripting to make you comprehensive developer expert in Linux \ Unix OS.
The topic covered are as follows:
How to write shell scripts from basic to advanced level
What is the shebang line and why every shell script need ones.
How to create and use variables
Testing and Decision Making
Command line arguments
Input and output
Conditional Statements
Exit status
filters like grep, awk, cut and sed
Functions
Loops
Case statements
Logging
Working with REST APIs using curl
Working with remote servers
Who this course is for:
Beginner Level to Advanced Level Automation Engineers with Bash Shell Scripting
Requirements
Need minimum knowledge on Unix/Linux Commands
Desire to learn shell scripting
Any Unix-Like OS running on Physical Machine or Virtual Machine or Virtual Machine from Any Cloud Provider
What you'll learn
Students will be able to understand shell scripting concepts
Students will be able to understand unix filters like awk, cut and sed
This course is helpful to Automate repetitive tasks in different Admin areas like Linux Admins, Middleware Admins, Database Admins, DevOps Admin and AWS Cloud Admins
Happy learning!!