Course Highlights
  • Be able to create PRO looking script with parameters
  • Use functions in script
  • Read files line by line using while loop
  • Use math in scripts
  • Be able to decide if value of specific variable is a regular file or a directory
  • Store commands output into an array
  • Be able to do decision making based on match with regular expressions
  • Use SED and AWK to take your scripts into next level
Curriculum

14 Topics
Introduction - welcome!
pwd
cd
ls
mkdir
touch
date
cat
rm + rmdir
cp
mv
wc
grep
find

19 Topics
Scripting - what it is all about?
Invoking the script
Sha-bang!
Test quiz 1-1
Using variables in scripts
Explicit definition - showcase
Read command
command substitution + time measurement
Test quiz 1-2
Math calculation
Math Calculation - showcase
Test quiz 1-3
Playing with $ : arguments arguments arguments
More on arguments - playing with IFS and assigning arguments value to a variable
Redirection and Piping
Redirection and Piping - showcase
Exit status
Test quiz 1-4
Practice test 1-1

14 Topics
Explaining IF
Mathematical comparisons
String comparisons
String comparison - you are not root??
Test Quiz 2-1
Wildcards
Wildcards - making linux command badass
Wildcards - create backup script
Regular expressions
Regular expressions - is there any reachable ip address ??
Test quiz 2-2
Filesystem related tests
Filesystem related tests - testing files permissions
&& and || - making IF statement shorter

3 Topics
Explaining for loop
Add commands output into all .txt files
Looping through all script arguments: "$@" or "$*" ??

2 Topics
Explaining while loop
Making own cat command with line numbering

6 Topics
Explaining case
Recheck users input
Creating script with parameters [-f file] [--file file] [-h] [--help]
(NEW) Manual Parsing vs Getopts vs Getopt
(NEW) Getopts - showcase script
(NEW) Getopt - showcase script

2 Topics
Explaining Array
Array - storing output of command into array and making some fun with its items

2 Topics
Explaining Functions
Making addition in a function

20 Topics
Explaining AWK
print BEGIN{} {} END{}
$1 $2 dollars everywhere
searching pattern
NF - number of fields
NR - number of records
FS - field separator
RS - record separator
variable assignment
if-else
for loop
Building script with AWK
AWK script PART 1 - reading arguments
AWK script PART 2 - was the location set?
AWK script PART 3 - searching for specific extension
AWK script PART 4 - what about not existing extension?
AWK script PART 5 - counting size of files using awk
AWK script PART 6 - setting largest and smallest file
AWK script PART 7 - printing statistics
AWK script PART 8 - reading awk part from separate file

19 Topics
Explaining SED
p - print command and -n option
a append/ i prepand
d - delete command
c - change command
q - quit command
-e option Run multiple sed commands
-i option Changing files for sure
e - perform shell commands
Explaining s - substitute command
s - substitute command showcase
Building script with SED
SED script PART 1 - structure for reading arguments
SED script PART 2 - fixing space/tab issues
SED script PART 3 - printing lines which don't have space/tab issues
SED script PART 4 - line numbering
SED script PART 5 - show spaces/tabs as a red background
SED script PART6 - show spaces/tabs also at the end of lines
SED script PART 7 - just to print it nicely

1 Topic
scripts

  Write a Review

Linux Bash Shell Scripting: Complete Guide (incl. AWK & SED)

Go to Paid Course