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 and automation
Rating: 4.0 out of 5(612 ratings)
17,153 students

Bash Shell scripting and automation

Linux command line and Bash Shell scripting
Created byShakil khan
Last updated 1/2018
English
English [Auto],

What you'll learn

  • Learn Linux commands and combine with shell script structural feature to create powerful commands and script.
  • Automate stuff using shell script
  • Write complex Bash shell script and save time
  • Very detail and in depth understanding of shell commands and scripting

Course content

1 section • 56 lectures • 9h 58m total length
  • Introduction To Bash Shell13:23

    Zip file contains entire shell script, power point presentation and doc file used in this course as it would be helpful for the students to refer to them from beginning.

  • Introduction to Shell Scripts13:23

    Learn how the bash shell serves as the command line interpreter that processes user input, expands commands with wildcards and substitutions, and interfaces with the kernel via system calls.

  • iterm, Terminal, hostname, uname16:09

    Learn how to run a bash script on macOS using the terminal or iTerm2. Compare behavior between macOS and Linux shells and use hostname and uname to inspect systems.

  • File System and Directory Hierarchy7:19

    Explore the Linux and Unix file system layout, including root, /bin, /home, /lib, and /proc, and learn how mounting and kernel files influence system organization.

  • Multi Tasking and Multi User5:06
  • Shell and environment Path13:42

    Explore how environment variables shape command discovery and execution in bash, including PATH, export, and unset, and differences between Linux and macOS, plus spawning new shells.

  • Some common commands like ls,cd,man,exit18:43

    Discover how to list files and directories with ls, use -l and -a for details and hidden items, understand permissions and links, and navigate with tab completion and man pages.

  • Some more common Linux commands13:36

    Explore a hands-on tour of essential Linux commands like cat, ls, and rm, with redirection, piping, and recursive deletion in Bash scripting.

  • cp, mv, clear, inode11:57
  • who, whoami,tty,which, locate,pwd10:09

    Explore Unix command line basics by using who, whoami, tty, which, locate, and pwd to identify logged-in users, current identity, terminal context, and file locations through practical examples.

  • calendar, date, time14:16

    Learn how the cal and date commands in linux display calendars, dates, and times. Format outputs with specifiers, view utc or local times, and set the system date with privileges.

  • vi editor part 117:16

    Install vim, then master vi editor basics: switch between command and insert modes, delete and yank lines, join lines, navigate with line numbers, and search and replace.

  • vi editor part27:30

    Master vi basics: save and quit with :wq or :q!, write changes, undo edits, navigate with h j k l, and manage files via vertical or horizontal splits and tabs.

  • chmod and user permissions12:02

    Explore chmod and file permissions on Linux and Unix, mastering user, group, and others; interpret read, write, execute bits and octal values to add or remove access securely.

  • chown, chmod, getent, chgrp8:19

    Explore how to change file ownership and group with chown and chgrp, set user, group, and others permissions with chmod, view users and groups with getent, and apply changes recursively.

  • Background Jobs and no hangup8:03
  • Sort and Uniq Command6:42

    This lecture shows how to use sort for text and numeric order, demonstrates -n and -r, and deduplicate with -u or by piping to uniq, noting ASCII ordering.

  • Top and ps command6:55
  • Pipes and redirection Part 113:46

    Explore file descriptors, standard input and output, and redirection in Linux/Unix, learn how to use >, >>, <, and dev/null to control command I/O and handle errors.

  • Pipes and redirection Part 211:49

    Explore bash redirection and pipes, including exec and file descriptors (0, 1, 2, 3), redirecting outputs to files and streaming between commands.

  • Wild Cards9:52

    Explore wild cards in bash scripting, using question marks, stars, and bracket ranges to match files and patterns, with backslash escapes for spaces and special characters.

  • Find Part 18:04

    Learn to use the find command to locate files and folders with -name and case-insensitive -iname, explore wildcards, depth limits with -maxdepth, and negation with -not -name.

  • Find Part 211:00

    Master using the find command in bash scripting to locate files by name and extension, limit search depth with -maxdepth, and include hidden files, while distinguishing files from directories.

  • Find Part 39:27

    Explore using the find command to locate files by permissions, including regular files, sticky bits, and ownership, and learn why setting 777 can be risky.

  • Find Part 410:59
  • grep command and common usage part-16:52

    Master grep usage to search with patterns, extended regex via egrep, fixed strings with -F, and count results with -c, including recursive searches and string quoting to handle spaces.

  • grep Part 212:10

    This lecture demonstrates advanced grep usage: case-insensitive matching, recursive searches, inverting matches, printing filenames with lines, and piping results to awk, sort, and unique for analysis.

  • Grep part 310:49

    Explore advanced grep usage with extended regular expressions, case-insensitive searches, word-boundary matching, and options for showing line numbers, hiding filenames, and color highlighting.

  • Grep part49:47

    Learn to use grep to search for keywords across files with patterns, including fixed strings and pattern files, and view colored matches with before and after context via piping.

  • Shell script's different component10:17
  • Functions and command line processing13:04

    Master bash scripting basics by processing command line arguments with $#, $0, and $1, and by defining and calling shell functions with positional parameters.

  • While Loop8:50

    Learn to use the bash while loop to run commands while a condition is true, using [ condition ]; do ...; done, with examples of a counter and sleep.

  • Until loop4:20

    Understand the bash until loop: it runs while the condition is false and exits when it becomes true, illustrated with examples using false, sleep, and a count variable.

  • For loop and its various syntax8:27

    Explore the bash for loop and its syntax variations, from classic ranges and sequences to infinite loops, including c-like syntax, with practical file duplication examples.

  • If conditional statement11:10

    Explore Bash if conditional statements and conditional expressions, including true/false evaluation, two syntax forms, else and elif branches, and comparison operators for numbers and strings, with practical examples.

  • Test Conditions for file type and strings18:14
  • Read user input and processing4:59

    Use the bash read command to capture user input into variables. Read into arrays, block until enter, and limit input with -n for a fixed number of characters.

  • Case statement AKA switch4:22
  • File Handling and processing12:52
  • Exit Status of Shell10:12

    Learn how shell exit status indicates success or failure, using zero for success and non-zero for errors, and how to capture and propagate exit codes in bash scripts.

  • Random number and its use case5:11
  • Arrays and Iterating over elements in different ways19:09

    Learn how to declare and access bash arrays, iterate over elements in multiple ways, and split input into items for efficient looping over IP lists.

  • Here Documents and Multi line comments, FTP scripts11:48
  • Trap and signals part-111:07

    Explore trap and signal handlers in Linux, showing how signals enable interprocess communication, how kill and trap differ, and how to trap SIGINT (Ctrl-C) to prevent termination.

  • Trap and signals part-213:22

    Explore trap and signals in shell scripting, implement signal handlers with a function, handle sigint and other signals, and use exit for clean termination after cleanup.

  • Trap and signals part-36:01
  • Trap and signals part-48:51

    Explore trap and signal handling in bash scripts, including exit, interrupt, and hangup signals, and observe how sleep and child processes influence cleanup and behavior across Linux and Unix variants.

  • Trap and signals part-59:41
  • Ubuntu Installation in virtual Machine15:31

    learn to install ubuntu in a virtual machine on a mac, including creating a vm, allocating memory and storage, and booting from a disk image.

  • dd and od command for hex representation and using dd to copy file11:56

    Learn how to use dd to copy data, create sparse files, test disk behavior with /dev/zero and block size and count, and inspect hex output with od.

  • df, du, lsof netstat19:42

    Explore disk usage with df and du, learn to read human-readable output and determine free space, and use lsof and netstat to inspect open files and network connections.

  • dmidecode, lcpu, lspci, lsusb and SMBIOS7:02
  • Partition, format and mounting a fresh disk9:16

    Practice partitioning, formatting, and mounting a fresh disk by attaching a new disk to a test machine, listing devices, creating a partition, selecting a file system, and mounting it.

  • nmap and port scanning8:16

    Explore nmap as a scanner for port scanning, discovering open ports and services, install and run scans on macOS, Linux, and Windows, and tune timing to balance speed and accuracy.

  • ssh, scp, sshpass9:40

    Learn to connect to remote linux machines using ssh and scp from mac or windows, specify ports, enable x11 forwarding with -X/-Y, and automate login with aliases and sshpass.

  • tcpdump and how to create pcap file for network packet capture.6:23

Requirements

  • Students should have basic knowledge of computers and some working principal of OS would be beficial
  • Knowledge of Programming language would be helpful in understanding the shell script construct however its not necessary

Description

Learn the complete set of linux and bash commands.
Learn how to automate things in Linux
Learn how to program in Bash Shell and writing professional water tight scripts.
Learn an exhaustive details about grep, fgrep, egrep etc and its various use case.
Learn and understand exec and shell redirection and various use case.
Learn how to leverage pipes and redirections to fit your custom needs.
Learn the construct of shell scripts like array, exit status, various conditional statement, switch case, test expression, string handling, command line arguments.

Detailed description of how shell interacts with kernel and whats is use case.learn exhaustive details on find command and various variance like finding executable file, zero size file, file of certain size range, file in certain date range etc.

Understand in great details of how to handle pipes and signal for a professional scripting scripting practice.

Learn how to debug Shell scripts in practicality and how to be a champ in Shell script writing.

This course goes in great depth of the internals of various commands so as to understand their working principal which helps in making the base of shell scripting knowledge strong and acts as a great binder to remember various stuffs.

You will also learn about Unix/Linux File and directory hierarchy and various ways permission and ownership of files and directory can be changed.

Who this course is for:

  • Anyone who is interested in learning Linux/Unix, Shell Programming and Linux Command lines