Author(s): Sundeep Agarwal
Publisher: Sundeep Agarwal
Year: 2019
Language: English
Pages: 94
Preface
Prerequisites
Conventions
Acknowledgements
Feedback and Errata
Author info
License
Book version
Introduction
Installation
Documentation and options overview
Editing standard input
Editing file input
Cheatsheet and summary
Exercises
In-place file editing
With backup
Without backup
Multiple files
Prefix backup name
Place backups in different directory
Cheatsheet and summary
Exercises
Selective editing
Conditional execution
Delete command
Print command
Quit commands
Multiple commands
Line addressing
Print only line number
Address range
Relative addressing
n and N commands
Cheatsheet and summary
Exercises
BRE/ERE Regular Expressions
Line Anchors
Word Anchors
Alternation
Grouping
Matching the metacharacters
Using different delimiters
The dot meta character
Greedy Quantifiers
Character classes
Escape sequences
Backreferences
Cheatsheet and summary
Exercises
Flags
Case insensitive matching
Changing case in replacement section
Global replace
Replace specific occurrences
Print flag
Write to a file
Executing external commands
Multiline mode
Cheatsheet and summary
Exercises
Shell substitutions
Variable substitution
Command substitution
Cheatsheet and summary
Exercises
z, s and f command line options
NUL separated lines
Separate files
File as source of sed commands
Cheatsheet and summary
Exercises
append, change, insert
Basic usage
Escape sequences
Multiple commands
Shell substitution
Cheatsheet and summary
Exercises
Adding content from file
r for entire file
R for line by line
Cheatsheet and summary
Exercises
Control structures
Branch commands
if-then-else
loop
Cheatsheet and summary
Exercises
Processing lines bounded by distinct markers
Uniform markers
Extracting first or last group
Broken groups
Summary
Exercises
Gotchas and Tricks
Further Reading