|
Text Modification
- addr a\
appends lines until a line without a trailing \
- addr1,addr2 c\
deletes the addressed lines and inserts following lines
- addr1,addr2 d = delete
- addr1,addr2 D = Deletes only the first line
- addr i\
Inserts text followed by the pattern space
- addr1,addr2 s/old/new/
Substitute the new string for the old pattern
Appending g makes it global (all patterns)
Appending p prints the pattern space if a change is made.
Appending w and a filename appends the pattern space to a file.
|