Join David D. Levine for an in-depth discussion in this video Solution: Change ten thousand men to one woman, part of SED Essential Training.
- The challenges to change the Duke of York's…ten thousand men to one woman…following the usual English rules…of grammar and capitalization.…I'll start off by taking a look…at the original Duke of York file.…Then, I will write a script…to change it.…I'll start off with a comment.…And in order to do that, we'll need to change…the ten thousand to one, obviously.…And we'll need to change…men to woman, do that globally.…Because there's only one woman now,…we'll need to change were to was.…
Do that globally.…And every place refer to them,…we'll need to change that to her.…And, wherever we talk about they,…it becomes she.…Will that do everything?…Oh no, not quite.…We need to add a special case…for the upper case they,…and change that to upper case she.…Control D to finish, let's see.…Does it work?…Well, it doesn't rhyme, it doesn't scan.…But it is grammatical and it is properly capitalized.…
So I'd say that's a successful solution to the challenge.…
AuthorDavid D. Levine
- Understanding input, output, files, and pipes
- Modifying the "s" command
- Using character classes and quantifiers
- Controlling printing
- Reading and writing files
- Appending, inserting, and editing entire lines
- Writing programs in SED
- Using advanced programming commands
Skill Level Intermediate
1. Sed Command-Line Basics
2. Regular Expressions
Using & and \n5m 34s
3. Sed Command-Line Flags
4. More sed Commands
5. Writing Programs in sed
Exiting with "q" and "d"3m 5s
6. Advanced Programming Concepts
- 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.