
Explore shell scripting basics, standards, and real-life automation through lab setup with VirtualBox and Linux, plus functions, arrays, strings, and looping concepts, and project-based practice exercises.
Download VirtualBox from virtualbox.org and select Windows hosts. Run the installer, accept prompts, use default options, and open Oracle VM VirtualBox.
Download and install putty from putty.org, choose 64-bit or 32-bit, and install; launch putty, enter the server IP, and log in with your user ID and password to connect.
Explore the shell as the command interpreter that interfaces users with the system, and learn bash features such as variable manipulation, command substitution, redirection, history, and tab completion.
Learn the basics of shell scripting by writing script files that automate sequences of commands in a shell or Linux, using loops to repeat tasks.
Follow a naming convention by organizing scripts in a dedicated directory and naming each script to describe its function, using appropriate extensions for the shell to avoid confusion.
Explore the shell scripting format to improve readability with comments, variables, and a clear script structure. Create a bash script with comments, variables, echo output, and executable permissions.
Master Linux file and directory permissions, including read, write, and execute for user, group, others, and all. Distinguish how files and directories handle these permissions and interpret ls -l outputs.
Learn practical ways to run a shell script from any directory using ./script, ssh a script file, or the full path, with a live demonstration showing the current time output.
Learn essential linux commands and terminal basics, including cd, ls, cat, pwd, man, clear, and exit, while understanding case sensitive commands and navigating directories.
Learn to list and inspect directory contents with ls and options like -l, -a, -h, and -t, then identify file types using ls -F and the file command.
Learn to use VI editor to create and edit files, switch between command, insert, and line modes, and save, search, substitute, undo, redo, copy, and paste.
Create a hello world bash script using echo, set executable permissions, and run it with ./ on a Linux machine to reinforce basic bash scripting skills.
Learn to define variables in shell scripting by creating and printing variable values with echo, using bash scripts, and distinguishing between simple value variables and command stored variables.
Explore bash arithmetic operators, including addition, subtraction, multiplication, division, exponentiation, modulus, and increment and decrement by constants, using double parentheses and the let keyword.
Learn how to define and manage string variables in shell scripting, using double quotes for spaces, printing techniques, calculating length, and concatenating strings.
Learn string comparisons in shell scripting, using equal and not equal operators, and test string length with -z, -n, and str in practical demos.
Write a Bash script that reads user input with the read command and echoes prompts and a welcome message using a variable named user_name.
Explore conditional statements in shell scripting by building a script that checks if a num variable equals ten, then prints the result, else prints not ten.
Explore case statements in shell scripting, enabling interactive menus that prompt for user input to choose option a, b, or c and execute corresponding commands such as pwd or date.
Explore the for loop in shell scripting and how it repeats tasks until a target count. See examples that print i values and iterate over text to automate repetitive work.
Explore the while loop in shell scripting by building a countdown script, showing a condition, a do block, and sleep delays to exit when the counter reaches zero.
Learn how the until loop controls shell scripts by running until a condition becomes true, showing its syntax (until, do, done) with a 0 to 5 counting example.
Learn how to implement a menu-driven shell script using the select loop to present options like employee, customer, and user, and handle selections with echo and conditional statements.
Master infinite loops in shell scripting by building a while loop with a true condition, using sleep to pause between iterations, and running a script named infinite loop script.
Explore exit statuses in shell scripting by learning how commands return zero on success and nonzero errors, with practical demos using pwd, echo $? and simple scripts.
Explore special variables in shell scripting, such as $0, $1, $2, $*, and $?, and demonstrate their roles in process ids, parameter counts, and exit status.
Explore how functions in shell scripting reuse code by grouping a small chunk of commands into a function defined with or without the function keyword, then call it.
Learn how to pass input and output parameters to a bash function, using $1 and $2, to compute and echo a sum in a practical script demonstration.
Master nested functions by creating two bash functions, where the first calls the second and both echo distinct messages; run the script to see 'first function' and 'second function' outputs.
Master indexed arrays in shell scripting with zero-based indices. Learn to declare arrays, access values by index, and print results in bash scripts.
Learn how to use associative arrays in shell scripting, declare and populate with key-value pairs, and access values by keys, contrasting with indexed arrays.
Learn string concatenation in shell scripting using two methods: the plus equal operator and simple adjacent strings, demonstrated with variables, echo outputs, and an indexed array approach.
Extract a substring from a string using a built-in bash command with the dollar sign and curly braces, specifying offset and optional length in a practical script demonstration.
Demonstrates nested loops in shell scripting by using an outer and inner loop to print numbers 1–3 three times each, via bash for loops and echo.
Learners explore nested conditions in shell scripting by testing even and odd numbers, divisibility by four or three, using read -p and double parentheses in if else blocks.
Learn how shifting parameters in bash moves arguments left with shift command, dropping the first. See a script that counts and prints arguments, then demonstrates shift and shift two outcomes.
Write a shell script to search and extract data from files, filtering errors, warnings, and failures in log messaging files with grep and wc, using absolute paths.
build a bash script that deletes the oldest files and folders older than five months using find with -mtime +150 and rm to manage disk space.
Create a bash script to back up the /ETSI directory by creating a tar archive, compressing with gzip, and verifying the backup.
Learn to use loops in a file system by writing bash scripts that create multiple files with a for loop and with user input, using touch and executable permissions.
Use the Linux last command to list users logged in and filter by date. Build a Bash script that prompts for day and month, uses grep, and displays login list.
Trace Linux log messages using a detailed command to print lines from log files and filter for errors. Demonstrate saving results to a log file and following updates with tail.
Automate Linux user account creation with a bash script that reads number of users and usernames, uses a for loop to create accounts with useradd, and verifies results in /etc/passwd.
Identify users not logged in for extended periods using last log and grep for never logged in, then disable them with a script using user mod -L.
Learn how to track process status, identify zombie processes, and terminate them on Linux using ps and kill, creating test processes and automating this workflow.
Learn how to add and delete data to an inventory file by prompting for a username and password, checking for existing records with grep, and appending new entries with bash.
Reuse one script's content in another by calling or sourcing scripts, using dot slash or full paths, and sharing variables across files with executable permissions.
Check remote hosts' status and connectivity by pinging their IPs and automating the process with a Bash script. Loop through an IP list to report connected or not.
Schedule scripts in Linux using cron jobs to automate tasks. Use crontab -e to define minutes, hours, day, month, and weekday, enabling scripts to run at a set time.
Learn how to check disk space status using a bash script that monitors df output, filters to the /dev filesystem, and notifies you when usage exceeds a set threshold.
Learn to create and verify files with a bash script, using read -p, for loop with seq, touch, and wc -l, then validate results with an if statement.
Learn to create a runtime bash script that captures the script name, title, and author, then generates, saves, and uses chmod to set executable permissions with prompts and vi editing.
Store data on a live server database by using a shell script to send name, location, and profession via a PHP web service to a MySQL database, and verify insertion.
Learn to fetch data from a live database server using a Bash script, a PHP web service, and a MySQL database, including creating and running scripts and checking results.
Explore the Linux directory structure and learn the purpose of key directories such as /boot, /root, /dev, /etc, /proc, /usr, /var, and /home, guided by the filesystem hierarchy standard.
Compare absolute paths, starting with a slash for full directory locations, to relative paths that depend on your current directory, using cd, tilde, and dot-dot.
Create files with touch and edit with vi, including multiple files and updating timestamps for existing ones, then build directories with mkdir and nested structures using -p.
Learn to change permissions using symbolic and octal notation with the mod command, applying user, group, and others and granting read, write, and execute permissions.
Learn to modify file and directory ownership for specific users and groups using chown and chgrp, including recursive changes with -R, demonstrated with creating files and users.
Copy files and directories with the copy command to duplicate items and observe default overwriting behavior. Enable confirmation with -i and copy directories recursively from dir one to dir two.
Remove files and directories using rm with options rm -i, rm -f, and rm -r, including recursively deleting nonempty directories. Experience forcing deletion with rm -rf to avoid prompts.
Use head and tail commands to view file contents, default first or last ten lines, and use options like -4 and tail -F for real-time log monitoring.
Explore wild cards, or metacharacters, for pattern matching using asterisk, question mark, and square brackets to filter and manage files across commands, including examples and practice.
Master grep for pattern matching with regular expressions in text, printing matching lines and using options like -v, -i, and -n, with examples of starting with specific words.
Master the pipe command to send output from one program to the next, chaining commands like cat, grep, less, and head or tail to filter and refine results.
Learn how shell aliases shorten long commands to improve efficiency, with bash syntax, practical examples, and how to create, check, remove, and make aliases permanent in the bashrc file.
Learn to compress and archive files using gzip, gunzip, zip, and tar, creating tarballs and gzip-compressed archives, then extract when needed.
Master tab completion in bash: use the tab key to auto-complete files, directories, or commands; double tab lists options, enabling efficient navigation and command entry.
Discover how to find your ip address in linux using hostname -I to display active addresses across interfaces, compare with ip addr for richer details, including loopback.
Learn to manage users and groups with commands like useradd, userdel, groupadd, groupdel, and usermod, including viewing IDs and customizing account details.
Use the ping command to test connectivity and measure round-trip time with 64-byte ICMP packets, observing bytes sent, packets, packet loss, RTT, and options for count, interval, size, and timeout.
Develop practical shell scripting skills through hands-on practice, demonstrations, and handouts, covering lab setup with VirtualBox and Linux, shell scripting standards, basic concepts, functions, arrays, and real life scripts.
This course will be beneficial for anyone who is interested in automating tasks or creating simple programs on a Linux operating system. Some examples of people who might benefit from learning shell scripting include: System administrators will be able to automate system maintenance tasks, such as backups and server updates. Data scientists will be able to learn about pre-process and organize data sets, or to automate data analysis pipelines. Web developers will be able to use to automate the deployment of web applications or to set up a local development environment. DevOps professionals will be able to use to automate the build, test, and deployment processes of software projects.
In this course we will cover the following:
Section 1: Course Overview
Course Overview
Section 2: Lab Setup
Installation of Virtual Box
Download & Installation of Linux(CentOS) on VirtualBox Step by Step
Download, Install and connect through putty
Section 3: Shell Scripting Standards
The Shell
What is Shell Scripting?
Naming Convention for Shell Script
Shell Scripting Format
File Permissions in Linux
How to Run a Shell Script
Basic Commands used in Shell Scripting
Listing files and understanding LS output
Text Editor vi Introduction
Quiz
Section 4: Shell Scripting Basic Concepts
Creating first script - Hello World
Defining variable
Arithmetic Expressions in Shell Scripting
String Manipulation in Shell Scripting
String Comparisons in Shell Scripting
Read and Echo (Input/Output) statements
Relational Operators in Shell Scripting
Conditional Statements (Decision Making)
Case Statement
For loop in Shell Scripting
Do-while in Shell Scripting
Until Loop in Shell Scripting
Select Loop in Shell Scripting
Infinite Loops, and Sleeping
Exit Status in Shell Scripting
Special Variables in Shell Scripting
Quiz
Section 5: Working with Functions, Arrays and String
Functions in Shell Scripting
Passing Parameters to a Function
Nested Functions
Indexed array in Shell Scripting
Associative array in shell Scripting
String Concatenation
Extract a substring from a string
Nested Loop in Shell Scripting
Nested Conditions in Shell Scripting
Shifting in Shell Scripting
Quiz
Section 6: Real Life Scripting
Searching and Extracting Data from Files
Shell script to delete oldest files and folders
Shell Script to Backup Files in Directory
How to use Loops in a file system?
Check Users Logged In, Ordered by Date, or IP Address
How to trace log messages in a shell script?
How to automate user account creation?
How to check users not logged in?
How to track the process's status and terminate it?
How to add and delete data from Inventory?
How to reuse one script information to another?
How to check the status and connectivity of remote hosts?
How to schedule script through cron job?
How to check disk space status?
How to create and verify created files?
How to create script on run time?
Store data on live server database
Get data from live database server
Quiz
Section 7: Additional Content
The Linux Directory Structure
Absolute vs relative path of a directory
Creating files and directories by command line
Changing File Permissions
Modify File Ownership for user and group
Copying Directories and Files
Removing Directories and Files
head and tail commands
Wild Cards
Grep
Pipe
Shell Aliases
Compressing and archiving files (using tar, gzip)
Explanation of Tab Key Completion
Find your IP address in linux
User and group administration by command
Ping command
Handouts