
Learn bash scripting essentials by exploring the terminal basics, including navigating directories with pwd, ls, and cd, using comments, and listing files in long and detailed formats.
Navigate the filesystem with relative and absolute paths, move across parent and home directories, use cd - to return, and employ the completion tab with ls -a for hidden files.
Discover how the Mac terminal and Linux shell share the same Unix foundation, and learn core commands like ls -l, ls -F, cd, and absolute paths for navigating directories.
Move, remove, and rename files and folders using mv and rm with -r, -v, and -i options. Learn that deletions are permanent and handle directories safely.
Learn to access and navigate text files in bash using cat, more, and less, including concatenating files, numbering lines, keyboard input, and in-window search.
Learn how the echo command prints text in the terminal, using -E for escapes and sequences like \n, \t, and \v, plus \c to suppress the trailing newline.
Learn to create files with touch, update their timestamps, create directories with mkdir (including nested and parent-child structures), and use options like -C and -B to control behavior.
Learn how wildcards in Bash match file name patterns using stars, question marks, character classes, and negation to select, move, or remove files.
Learn to set and access variables in Bash, including arrays, using $ and ${} for precise references. Master substring extraction with ${var:pos:len}, negative indices, length, concatenation, and unset behavior.
Learn to manipulate Bash variables by removing characters from the start or end using hash and percent signs, and using wildcards to erase up to a target.
Make shell variables permanent by editing the login script files such as dot profile or dot bashrc, then source the profile to apply changes immediately.
Learn how the read command takes input into a variable, stores it, and uses a prompt with -p; if no variable is named, input goes to the REPLY environment variable.
Learn how to redirect a command’s normal output and errors from the terminal to files, using > to overwrite and >> to append, with echo and cat examples.
Redirect the standard error to a file, manage standard output, and separate them with two greater-than signs, using the dev folder as a discard sink.
Search inside files with grep to find lines containing a pattern; use -i for case-insensitive matches and -v to exclude lines, or pipe with ls.
Harness brace expansion to generate multiple files and folders quickly using curly braces, ranges like 1..7 or a..h, and combined patterns.
Explore how users, owners, and groups determine file permissions in Unix-like systems, learn what makes a script executable, and read permission strings using ls -l across Linux and Mac UNIX.
Learn how to change file permissions using the change mode command, including setting owner, group, and other access (read, write, execute) and using plus x to make a file executable.
Create your first bash script by adding a shebang (#!/bin/bash), make it executable with chmod +x, and run it as ./Hello to see it execute.
Learn to use bash if-else-elif constructs to test strings, emptiness with -z, and non-empty with -n. Practice interactive input and multi-branch actions for strings, numbers, and files.
Master bash if conditions for numbers and files. Learn integer comparisons and file tests, including existence, type, size, and negation, as well as permissions like readable and executable.
Explore bash logic conditions by combining tests with and (-a) and or (-o), check numbers within ranges, verify non empty and executable files, and use modern [[ ]] syntax.
Learn a practical bash scripting trick to jump up multiple directories with a single command. Showcase a bash script and three key parts of bash scripting for automation.
Use the source command to run a script in the current shell, updating variables and preserving the shell context, and note how dot notation, subshells, exit, and exec behave.
Use the type command to determine whether a command is an executable program, a shell built-in, or an alias, with examples like cat, cd, and ls.
Create and use bash aliases to shorten frequent commands, verify them with type, and make aliases permanent by adding them to your login script.
Use command substitution with $(command) to capture output, reuse it in scripts, and assign results to variables. Understand timing differences between live command output and static values, like date.
Explore how bash scripts accept and process parameters with $1, $2, and beyond, using braces for multi-digit indices, and count and iterate parameters with $# and $@/$* in loops.
Develop a back script that uses cd .. to ascend directories, addresses sub shell behavior, and leverages source with an alias to affect the current shell.
Add the script folder to the path, export it, and source your profile to run scripts anywhere in the terminal.
Every command has exit status, zero for success and non-zero for failure; view it with echo $?, grep shows 0 for matches, 1 for no matches, and >1 for errors.
Define and call shell functions to reuse code, pass inputs with positional parameters like $1 and $2, and use return values and exit statuses to signal success or failure.
Explore how variable scope works in bash functions, distinguishing global and local variables, and learn why using local keeps functions as black boxes.
Explore terminal computations, review basic arithmetic expressions, and learn the right environment for clear and advanced calculation toward the final script.
Explore the problems of bash arithmetic expansion, including lack of decimals and negative powers, and learn to use bc to perform accurate calculations inside scripts.
Master the bc environment to perform arithmetic, set scale for decimals, and use boolean expressions, powers, and square root. Use -l for math functions and -q for quiet mode.
Learn to redirect input with a here document, using a delimiter like AAA to feed content to cat and bc in scripts.
Learn how to redirect a command's input from a string using the here string, enabling commands like cat, bc, and read to read input without keyboard input.
Master the bash shift command to rotate positional parameters: $1 becomes $2, $2 becomes $3, and so on, with optional step counts and $0 providing the script’s absolute path.
Learn how to handle input and input redirection in bash by examining the internal field separator. Discover how to split elements or pass a single element.
Explore reading multiple variables in bash with the read command and here string redirection. Learn how to map values to A, B, C, D and handle extra input efficiently.
Learn to use the grep command to search text inside files, handle case sensitivity with -i, and combine grep with pipes and -v to filter results.
Learn how the internal field separator (IFS) governs bash read splitting, with examples using spaces and underscores, and how to temporarily change and restore IFS.
Learn to read complex Linux password files with Bash by using the IFS delimiter and redirection, and build a script to fetch a specific user's info from /etc/passwd.
Explore bash shell scripting: build a script to fetch user info from a password file via grep, parse with IFS and read, and handle not-found cases interactively.
Explore building a PATH script that inspects the PATH environment, lists directories, checks program presence with -c, shows locations of a command, and verifies if a folder is in PATH.
Develop a path script that lists each directory in PATH with a for loop, adjusting IFS, and verify command presence using -c and which while handling trailing slashes.
Create and run a bash script named max_string to read a file and identify the longest string contained in the file.
Learn how the pipe command chains the output of one command as input to another, with practical bash scripting examples like ls, tail, sort, and redirecting to files.
Learn how to use the wc command to count lines, words, and characters, understand newline effects, and apply -l, -w, and -m with pipes and simple folder counts.
Learn how the strings command extracts printable character sequences from a file, with a default minimum length of four, and how -n adjusts this threshold.
Develop a bash max string script that finds the longest word in a file by iterating words, computing lengths, and updating the reference word with input validation and built-in length.
Explore bash arrays: create, access, and modify one-dimensional arrays by index, loop through elements, append values, and count or unset elements for efficient scripting.
Learn to use the cut command to extract specific characters or fields from output, using -c and -b, ranges, and -F with -d/--delimiter.
Learn how the stat command reveals detailed file information on Linux, Unix, and Mac, including name, size, permissions, owner, group, and access times, with -c or --format.
Discover how the macOS stat command shows file metadata, produce readable output with -X, use format specifiers (percent N, U, G, S), and create aliases and portable scripts.
This lecture shows a portable bash script that counts file modification times in a directory using stat, tallies hourly occurrences with an array, and formats am/pm output.
Celebrate your progress by applying learned pieces to solve problems and create bash scripts, moving from zero to automation through topic focused lessons that cover wild cards and sub shells.
Do you know any real and practical Bash Shell script?
There is a lot of abstract Bash Scripting that shows you isolated elements of bash programming.
However this can go only so far. You will not be ready for real world programming in your job if you have a theory based knowledge.
In this Course We will cover ALL the basics of terminal and bash scripting thoroughly, but without wasting any time,
we will then Automate 6 Simple and Real Task with Bash Scripts that you can use in your everyday life as a programmer.
They are carefully selected to build all the skills you need in Bash Scripting.
For this Reason they are of incremental complexity.
We will present and explain in details a command or a practice in Bash Scripting ONLY when it will be used in one of our main real world scripts, and we will build it together step by step, showing you the best practices when programming a real script.
In this way, not only will you learn ALL the fundamental ( and even some advanced ) elements in Bash Scripting, but you will know how to apply those in a Real scenario to solve a Real Problem.
Everything is explained at a slow pace and thoroughly to make sure you can follow along.
Even if you never used the command line, the First 2 Sections will teach you all the tools necessary to use the command line and start writing your shell scripts, nothing important is left out, nothing useless is left in.
By the end of the course you'll be writing your own Shell Scripts, in particular you will learn how to:
Use the command line
Automate tasks using Shell Scripts
Create and use variables in your scripts
Manipulate variables to a wide extent
Use Wildcards
Use Input and output Redirection
Source subshells
Make decisions by using if-else statements
Loop through files and folders
Make decision based on strings, variables or files
Use arithmetic expression
Use advanced computations with the BC command line environment
Scripts with parameters and how to "shift"
Change the Internal field separator plus why and when to do so.
Use Arrays
How to properly use your PATH, and a script to work with it
Create Shell Scripts that solves real world problems
and much more...
You will write Scripts that:
Move back any numbers of directories you want in the terminal
Find the longest string inside any text file
Performs computations that terminal normally does NOT allow
Read files in your Linux system that have particular separators ( not the usual space )
Get clear Information of files in your PATH, the most important environment variable of your system
Use arrays to know how many times your files were modified during the day
Writing these scripts will allow you to develop an actual skill in creating scripts to solve real problems.
You can Become a Programmer in Bash Scripting who knows how to solve actual problems.
and You can start now.
Looking forward to see you there.
Francesco