Learning Linux Shell Scripting 2018

Learning Linux Shell Scripting 2018

English | MP4 | AVC 1280×720 | AAC 48KHz 2ch | 1h 26m | 204 MB

Linux shell scripting is a useful tool for eliminating repetitive, boring tasks. Scripts make many jobs—from programming to system administration—easier, more predictable, and more fun. By the end of this course, even new users will be able to read and create scripts to automate many kinds of tasks in Linux. Instructor Troy Miles first covers the basics of scripting, such as printing to the console and defining variables. Then he shows how to write scripts that accept parameters, read and write files, and monitor other system processes. Plus, find out how to create interactive scripts and handle bad input data.

Topics include:

  • Printing to the console
  • Commenting out scripts
  • Defining variables and parameters
  • Creating your first simple script
  • Branching and loops
  • Reading environment variables
  • Reading and writing files
  • Watching a process
  • Getting input from users
  • Handling bad data
Table of Contents

Introduction
1 Welcome
2 What you should know

Shell Scripting Basics
3 Printing to the console
4 chmod
5 Comments
6 The shebang
7 Creating and using variables
8 Passing parameters
9 Challenge – Create a script
10 Solution – Create a script

Branching and Loops
11 The if statement
12 The else clause
13 The elif clause
14 The while loop
15 The for loop
16 Using break and continue
17 Challenge – Counter
18 Solution – Counter

Environment Variables
19 Reading environment variables
20 Standard environment variables
21 Challenge – Display a variable
22 Solution – Display a variable

Functions
23 The basics of functions
24 Using parameters
25 Piping
26 Challenge – Pipes and functions
27 Solution – Pipes and functions

File Operations
28 Reading files
29 Writing files
30 File checksums
31 Challenge – Read a text file
32 Solution – Read a text file

Sleep and Process
33 Using the sleep command
34 Watching a process
35 Challenge – Watch a script
36 Solution – Watch a script

Interactive Scripts
37 Getting input from users
38 Handling bad data
39 Challenge – Guessing game
40 Solution – Guessing game

Conclusion
41 Next steps