Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Bash Shell Scripting: From Zero To Automation
Highest Rated
Rating: 4.6 out of 5(1,104 ratings)
5,158 students

Bash Shell Scripting: From Zero To Automation

Learn all Bash Basics, Then Master Bash Shell Scripting by Automating 6 Simple Tasks of incremental Difficulty
Created byFrancesco Santi
Last updated 2/2021
English

What you'll learn

  • Write your own Shell scripts for Automation
  • Strings, variables and files manipulation
  • Learn to Automate 6 Simple Tasks on your computer with 6 Shell Scripts
  • If-Else statements
  • Advanced Arithmetic expressions
  • Loops through files and folders
  • The Path Environment Variables
  • Input and Output Redirection
  • Arrays
  • Wildcards
  • and more...

Course content

9 sections70 lectures6h 26m total length
  • Introduction and Basics8:34

    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.

  • READ ME for NEW Students1:26
  • Move around: CD. Completion: TAB. Hidden files: ls -a7:00

    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.

  • Mac Unix Linux2:15

    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.

  • Track Your Progress0:50
  • Copy: Cp7:27
  • Move, Remove, Copy files and folders around.3:52

    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.

  • Access Files: Cat, Less, More5:56

    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.

  • Print on the screen: Echo4:26

    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.

  • Create Directories and Files: Mkdir, Touch5:51

    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.

  • Wildcards7:51

    Learn how wildcards in Bash match file name patterns using stars, question marks, character classes, and negation to select, move, or remove files.

  • Variables7:40

    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.

  • Variables Manipulation5:19

    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.

  • Permanent Variables5:39

    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.

  • Read from input: Read2:00

    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.

  • Redirect the output7:34

    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 error8:31

    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.

  • Pipe4:32
  • Grep3:43

    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.

  • Brace Expansion4:03

    Harness brace expansion to generate multiple files and folders quickly using curly braces, ranges like 1..7 or a..h, and combined patterns.

  • Permissions in the terminal6:32

    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.

  • Change Permissions on Files4:21

    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.

Requirements

  • Extremely Basic knowledge of the terminal
  • Have a Linux or Mac system ( Also Windows 10 with a linux terminal or GitBash inside)

Description

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:

  1. Move back any numbers of directories you want in the terminal

  2. Find the longest string inside any text file

  3. Performs computations that terminal normally does NOT allow

  4. Read files in your Linux system that have particular separators ( not the usual space )

  5. Get clear Information of files in your PATH, the most important environment variable of your system

  6. 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

Who this course is for:

  • Anyone who would like to learn how to automate tasks with the terminal
  • Anyone familiar with the Terminal but not with Shell Scripting
  • Anyone who wants to learn by creating
  • Anyone who wants to see and learn simple real world bash scripts