Bash Patterns and Regular Expressions

Bash Patterns and Regular Expressions
Bash Patterns and Regular Expressions
English | MP4 | AVC 1280×720 | AAC 48KHz 2ch | 2h 02m | 243 MB

Pattern matching allows you to create a script that can act on pieces of data if it matches a specific pattern. This makes it possible to script automation into a system process. In this course, learn how to use pattern matching in a Bash script using globs, extended globs, brace expansion, and regular expressions (regex). Throughout this course, Grant McWilliams covers the differences between basic and extended regexes and delves into using extended regexes in bash conditional statements, grep, sed, and AWK.

Topics include:

  • What are globs and extended globs?
  • How locale affects searches
  • Making extended globs persistent
  • Comparing extended globs with regular expressions (regexes)
  • Using brace expansion for patterns
  • Working with extended regexes
  • Using sed
  • Regexes in AWK
Table of Contents

1 Use Bash to pull data in seconds
2 What you should know
3 What are globs
4 Shell expansion order
5 Wildcards
6 Character sets
7 The effect of locale on searches
8 Character classes
9 Shell globbing options
10 What are extended globs
11 Why you should use extended globs
12 Make extended globs persistent
13 Getting started with extended globs
14 Pattern matching with extended globs
15 Using extended globs with commands
16 Comparing extended globs with regular expressions
17 What is brace expansion
18 Using brace expansion for patterns
19 What are regular expressions
20 Why aren’t regexes consistent
21 Basic vs. Extended Regular Expressions
22 Regex support in command line tools
23 Matching characters and words
24 Specifying occurrences
25 Alternation and grouping
26 Back references and subexpressions
27 Regexes in if conditionals
28 Using BASH REMATCH
29 Challenge Regex to find credit card numbers
30 Solution Regex to find credit card numbers
31 Using regular expressions with grep
32 Perl compatible regexes with grep
33 Performance optimizing grep searches
34 Challenge Create a regex to find telephone numbers
35 Solution Create a regex to find telephone numbers
36 Using sed
37 Using extended regexes in sed
38 Challenge Create a regex to find IPv4 addresses
39 Solution Create a regex to find IPv4 addresses
40 Using regexes in AWK
41 Pattern matching differences in AWK
42 Next steps