O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Advanced Bash Scripting

Video Description

5 Hours of Video Instruction

Overview

Expand your Bash scripting skills in 5 hours!

Description

Further your scripting skills with this essential Bash training course. Sander van Vugt, best-selling author of Red Hat and general Linux book and video titles, walks you through everything you need to know to take your Bash skills to the next level. This course will teach you scripting best practices and syntax differences. You will also learn how to use advanced awk, sed, and regular expressions before jumping in to how to analyze advanced scripts. After that, you will dig in to how to write complex scripts and explore the concept of scripting for performance. You will then end with scripting in Python.

This course consists of eight lessons that fully explain advanced Bash scripting concepts. Every lesson contains practical examples to show how scripting solutions are being used in the real world. At the end of each lesson, Sander van Vugt will provide a real scripting exercise so you can test your own skills. You can then review your work against the author’s in a solutions video.

The video lessons cover the following topics:

Lesson 1: Reviewing Basics
Lesson 2: Scripting Best Practices
Lesson 3: Understanding Syntax Differences
Lesson 4: Using Advanced awk, sed, and Regular Expressions
Lesson 5: Analyzing Advanced Scripts
Lesson 6: Writing a Complex Script
Lesson 7: Scripting for Performance
Lesson 8: Beyond Bash; Scripting in Python

About the Instructor

Sander van Vugt is an independent Linux trainer, author, and consultant living in the Netherlands. Sander has written numerous books about different Linux-related topics and many articles for Linux publications around the world. Sander has been teaching Red Hat, Ubuntu, SUSE, and LPI Linux classes since 1994. As a consultant, he specializes in Linux High Availability solutions and Performance Optimization. Sander van Vugt is the best-selling author of the Red Hat RHCSA/RHCE Cert Guide, the Red Hat Certified System Administrator (RHCSA) Complete Video Course, and many other titles. More information about Sander is on his website at www.sandervanvugt.com.

Skill Level

Intermediate

What You Will Learn

Bash scripting intermediate and advanced techniques

Who Should Take This Course

The target audience for this course consists of Linux users and professionals who have basic Bash skills and now want to extend their skills automating tasks on Linux using Bash shell scripts. A secondary target audience consists of IT users and professionals who want to get experience with simple programming languages.

About LiveLessons Video Training

LiveLessons Video Training series publishes hundreds of hands-on, expert-led video tutorials covering a wide selection of technology topics designed to teach you the skills you need to succeed. This professional and personal technology video series features world-leading author instructors published by your trusted technology brands: Addison-Wesley, Cisco Press, IBM Press, Pearson IT Certification, Prentice Hall, Sams, and Que. Topics include IT Certification, Programming, Web Development, Mobile Development, Home and Office Technologies, Business and Management, and more.
View all LiveLessons on InformIT at http://www.informit.com/livelessons

Table of Contents

  1. Introduction
    1. Advanced Bash Scripting: Introduction 00:01:29
  2. Lesson 1: Reviewing Basics
    1. Learning objectives 00:00:40
    2. 1.1 Using Pattern Matching 00:03:41
    3. 1.2 Using Command Substitution 00:02:52
    4. 1.3 Using Arguments and Variables 00:07:30
    5. 1.4 Using Iteration Structures (Part 1) 00:07:32
    6. 1.5 Using Iteration Structures (Part 2) 00:06:24
    7. 1.6 Using Arrays 00:05:05
    8. 1.7 Using Functions 00:01:28
    9. 1.8 Analyzing Math Script 00:12:27
    10. Exercise 1 00:01:24
    11. Exercise 1 Solution (Part 1) 00:12:54
    12. Exercise 1 Solution (Part 2) 00:05:46
  3. Lesson 2: Scripting Best Practices
    1. Learning objectives 00:00:33
    2. 2.1 Organizing Scripts 00:02:14
    3. 2.2 Working With Include Files 00:03:45
    4. 2.3 Using Internal vs. External Commands 00:02:56
    5. 2.4 Making Shell Scripts More Secure 00:04:59
    6. 2.5 Analyzing Foo Script 00:02:20
    7. 2.6 Analyzing Cd Script 00:02:54
    8. Exercise 2 00:00:25
    9. Exercise 2 Solution 00:05:13
  4. Lesson 3: Understanding Syntax Differences
    1. Learning objectives 00:00:35
    2. 3.1 Understanding the Origins of Bash 00:01:52
    3. 3.2 Using Bourne Style Syntax 00:04:02
    4. 3.3 Using C-Style Syntax 00:03:44
    5. 3.4 Using Different Methods to Test 00:03:17
    6. 3.5 Using Different Methods to Calculate 00:03:21
    7. 3.6 Analyzing Tcsh Script 00:03:59
    8. 3.7 Analyzing Tcsh Script in Bash 00:01:57
    9. Exercise 3 00:00:20
    10. Exercise 3 Solution 00:13:00
  5. Lesson 4: Using Advanced awk, sed, and Regular Expressions
    1. Learning objectives 00:00:39
    2. 4.1 Using Regular Expressions 00:04:52
    3. 4.2 Understanding sed Basics 00:05:31
    4. 4.3 Performing Advanced sed Operations 00:08:29
    5. 4.4 Understanding awk Basics 00:05:36
    6. 4.5 Performing Advanced awk Operations 00:05:38
    7. Exercise 4 00:00:29
    8. Exercise 4 Solution 00:01:53
  6. Lesson 5: Analyzing Advanced Scripts
    1. Learning objectives 00:00:31
    2. 5.1 Analyzing the Structure 00:01:27
    3. 5.2 Analyzing the Parts in the Script 00:01:47
    4. 5.3 Analyzing the /etc/init.d/network Script 00:12:04
    5. 5.4 Analyzing the /etc/profile Script 00:07:26
    6. Exercise 5 00:00:39
    7. Exercise 5 Solution 00:07:32
  7. Lesson 6: Writing a Complex Script
    1. Learning objectives 00:00:22
    2. 6.1 Defining the Mission Statement 00:03:35
    3. 6.2 Creating the Script Structure 00:02:57
    4. 6.3 Writing the Code 00:08:01
    5. 6.4 Considering Next Steps (Part 1) 00:11:17
    6. 6.5 Considering Next Steps (Part 2) 00:07:00
    7. 6.6 Implementing Next Steps 00:02:21
    8. Exercise 6 00:00:49
    9. Exercise 6 Solution (Part 1) 00:12:53
    10. Exercise 6 Solution (Part 2) 00:14:16
  8. Lesson 7: Scripting for Performance
    1. Learning objectives 00:00:32
    2. 7.1 Optimizing Loops 00:01:48
    3. 7.2 Minimizing File Writes 00:01:56
    4. 7.3 Minimizing External Command Usage 00:03:09
    5. 7.4 Avoiding Useless Commands (cat /etc/passwd | grep root) 00:01:53
    6. 7.5 Minimizing Operations 00:03:32
    7. 7.6 Analyzing Script Performance with time 00:01:57
    8. 7.7 Analyzing Script Performance with strace 00:01:44
    9. Exercise 7 00:00:25
    10. Exercise 7 Solution 00:10:40
  9. Lesson 8: Beyond Bash; Scripting in Python
    1. Learning objectives 00:00:44
    2. 8.1 Comparing Bash to Python 00:03:02
    3. 8.2 Programming in Python 00:02:27
    4. 8.3 Writing your First Python Script 00:01:06
    5. 8.4 Working with Arguments 00:02:07
    6. 8.5 Using Indentation 00:02:37
    7. 8.6 Interactive Python 00:02:13
    8. 8.7 Writing Output to Files 00:02:07
    9. Exercise 8 00:00:37
    10. Exercise 8 Solution 00:01:21
  10. Summary
    1. Advanced Bash Scripting: Summary 00:00:31