Join Kevin Skoglund for an in-depth discussion in this video sed: Regular expressions and back-references, part of Unix for Mac OS X Users.
In the last movie, we got familiar with the syntax of sed, but all of our…searching so far has been with literal text strings.…Now we're going to learn to use regular expressions with sed.…It may seem like sed is really similar to grep.…That's because it is.…All sed is, is grep and then substitute.…So put another way, anything that you can find with grep, you can change with…sed, and that includes making good use of regular expressions.…So as a simple example of this, let's just have echo "Who needs vowels?" and…we'll pipe that into a sed expression where we will look for anything that is in…a, e, i, o, or u, inside a character set and we'll replace that with an…underscore. We'll do it globally. So there you go.…
You see it took all of the vowels that were in that character set and replaced…them with the underscore. So we can use regular expressions.…Now, the regular expressions here work exactly like they do with grep, meaning…that we also have an issue with basic versus extended regular expressions.…
- Moving around the file system
- Creating and reading files
- Copying, moving, renaming, and deleting files and directories
- Creating hard links and symbolic links
- Understanding user identity, file ownership, and sudo
- Setting file permissions with alpha and octal notation
- Changing the PATH variable
- Using the command history
- Directing input and output
- Configuring the Unix working environment
- Searching and replacing using grep and regular expressions
- Manipulating text with tr, sed, and cut
- Integrating with the Finder, Spotlight, and AppleScript
Skill Level Beginner
1. Introduction to Unix
2. Filesystem Basics
3. Working with Files and Directories
4. Ownership and Permissions
5. Commands and Programs
6. Directing Input and Output
7. Configuring Your Working Environment
8. Unix Power Tools
9. Useful Mac-Only Commands and Techniques
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.