
Explore grep and sed on Linux for beginners, covering regex concepts, pattern matching, email and phone validation, piping outputs, and scripting.
Learn to use grep on Linux for beginners with switches -i for ignore case, -v to invert matches, and -c to count results, demonstrated across multiple files and directories.
Learn practical grep usage on linux by applying -l, -L, -n, and -h to list matching files, suppress filenames, show line numbers, and invert matches with regex examples.
Explore grep command line options, learn variants like egrep and fgrep, and use the manual page to discover extended, basic, and perl regular expressions, plus patterns from files.
Learn how to pipe command output into grep to filter directory listings and other results, using regular expressions to match patterns at line starts, ends, and dates like August.
Master meta characters in regular expressions, including anchors, dot, back references, bracketed expressions, negation, alternation, quantifiers, and basic versus extended regex in grep.
Apply grep with extended regex to extract valid e-mail addresses from a file, anchoring to line start, matching user and domain patterns, and saving results to a text file.
Learn to validate U.S. phone numbers with grep and sed by building extended regex patterns, including optional parentheses, dashes, exact digit groups, and end-of-line anchoring.
Master sed, the stream editor, by performing substitutions with the s command using regular expressions and delimiters, illustrated by red ball to blue ball and delimiter choices including escaping.
Use sed to substitute patterns in the wagons text, such as red to black, and suppress output with -n to show only altered lines, while exploring backreferences and escaped parentheses.
Explore sed addressing to print specific lines using line numbers, ranges, and regular expressions. Suppress default output with -n and use extended regular expressions in addressing alongside the s command.
Learn to use grep and sed on linux to identify lines with correct phone numbers using regular expressions, print their line numbers, and script sed with expression files.
Explore sed scripting basics, including -n and -f, insert and append commands, and crafting formatted reports; contrast with awk for extracting specific fields.
One of the most important tasks we undertake in Linux is processing text in files. This course explores two powerful tools we have to do this: grep and sed. Grep and sed find and manipulate text in files using regular expressions, which use special characters for searching and replacing text.
In the course, we’ll introduce regular expression syntax in the context of learning grep, then apply what we’ve learned as we work with sed. Topics include:
- finding text with grep
- regular expression syntax
- meta characters
- validating emails and phone numbers
- intro to sed
- replacing text in files
- line number addressing
- outputting only found lines
- printing line numbers
- adding text before and after lines
- simple sed scripts
The course is in two units, and runs just over an hour in length.